Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create function r(str text) returns text as $$ begin return reverse(str); end; $$ language plpgsql; select * from r('Hello world!'); create function fact(n integer) returns integer as $$ declare result integer := 1; begin for i in 2..n loop result := result * i; end loop; return result; end; $$ language plpgsql; select * from r('Hello world!'); select fact(10);

Stuck with a problem? Got Error? Ask AI support!

Copy Clear