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 TABLE table_1 (name text, quantity int, PRIMARY KEY (name)); INSERT INTO table_1 (name, quantity) VALUES ('Name1', 1); INSERT INTO table_1 (name, quantity) VALUES ('Name1', 1), ('Name2', 1) ON CONFLICT (name) DO UPDATE SET quantity = quantity + 1 ; SELECT * FROM table_1;)

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

Copy Clear