github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/udf/udf.sql (about) 1 create function sql_sum (a int, b int) returns int language sql as '$1 + $2'; 2 select sql_sum(1, 1) as ret; 3 drop function sql_sum(int, int); 4 create database db1; 5 use db1; 6 select name, db from mo_catalog.mo_user_defined_function where db = 'db1'; 7 create function helloworld () returns int language sql as 'select id from tbl1 limit 1'; 8 select name, db from mo_catalog.mo_user_defined_function where db = 'db1'; 9 drop database db1; 10 select name, db from mo_catalog.mo_user_defined_function where db = 'db1'; 11 create function db1.helloworld5 () returns int language sql as 'select id from tbl1 limit 1'; 12 create database db1; 13 use db1; 14 create function db1.helloworld5 () returns int language sql as 'select id from tbl1 limit 1'; 15 drop function db1.helloworld5(); 16 drop function db2.helloworld5(); 17 drop database db1;