SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
/*create function hello () returns text as $$ begin Return 'Hello'; end; $$ language plpgsql; select * from hello(); */ create funcrion fact (a integer) returns integer as $$ declare factorial integer := 1; begin if a < 1 then return factorial; for i in 1..a loop fact = fact * i; end loop; retrun facrorial; end; $$ language plpgsql; select * from fact (3); /*create funcrion r (str text) returns text as $$ begin Return reverse (str); end; $$ language plpgsql; select * from r(aba);*/
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear