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
EXECUTE BLOCK AS BEGIN BEGIN EXECUTE STATEMENT ' CREATE TABLE users ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(32) UNIQUE ) '; WHEN SQLCODE -607 DO -- -607 = "relation already exists" BEGIN -- Ignore "table exists" error END END EXECUTE STATEMENT 'INSERT INTO users (name) VALUES (''Alex'')'; EXECUTE STATEMENT 'INSERT INTO users (name) VALUES (''Maria'')'; END

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

Copy Clear