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 info ( ID int generated always as identity, FirstName text, LastName text, Year int2, Mounth int2, primary key (FirstName, LastName) ); INSERT INTO info (FirstName, LastName, Year, Mounth) VALUES ('Дима', 'Скрипов', 1990, 10); INSERT INTO info (FirstName, LastName, Year, Mounth) VALUES ('Дима', 'Скрипов', 1999, 12) ON CONFLICT (FirstName, LastName) DO UPDATE SET Year = excluded.Year, Mounth = excluded.Mounth; SELECT * FROM info;

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

Copy Clear