SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE tbl (id serial primary key, chtoto _varchar); INSERT INTO tbl (id, chtoto) VALUES (74291910, array['string']) ON CONFLICT (id) DO UPDATE SET chtoto=array_append(tbl.chtoto, 'string'); select * from tbl; INSERT INTO tbl (id, chtoto) VALUES (74291910, array['string2']) ON CONFLICT (id) DO UPDATE SET chtoto=array_append(tbl.chtoto, 'string2'); select * from tbl;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear