SQLize Online / PHPize Online

A A A
Share   Donate   Blog   Popular
Copy Format Clear
create table t1 as select n as id, md5(n::text) as txt from generate_series(1, 10) s(n); create table t2 as select n as id, md5((n + 100)::text) as txt from generate_series(1, 10) s(n); create function func_test() returns table (id int, txt text, txt2 text) language plpgsql as $$ declare qry text; begin qry := $q$select t1.*, t2.txt as txt2 from t1 join t2 using(id)$q$; return query execute qry; end; $$; select * from func_test();
Stuck with a problem? Need help? Ask professionals on our Telegram channel!
Join the channel
Your quersion is posted.
Join our Telegram channel and get answers.
Send
Copy