SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE counter ( site varchar(64) primary key, count int, updated_at timestamp ); INSERT INTO counter ( site, count, updated_at ) VALUES ('Site 1', 1, strftime('%Y-%m-%d %H-%M-%S','now')); SELECT * FROM counter; INSERT INTO counter ( site, count, updated_at ) VALUES ('Site 2', 1, strftime('%Y-%m-%d %H-%M-%S','now')) ON CONFLICT(site) DO UPDATE SET count = count + 1; SELECT * FROM counter;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear