Search
 
SCRIPT & CODE EXAMPLE
 

SQL

ON DUPLICATE KEY UPDATE for postgres

INSERT INTO the_table (id, column_1, column_2) 
VALUES (1, 'A', 'X'), (2, 'B', 'Y'), (3, 'C', 'Z')
ON CONFLICT (id) DO UPDATE 
  SET column_1 = excluded.column_1, 
      column_2 = excluded.column_2;
Comment

PREVIOUS NEXT
Code Example
Sql :: QL HAVING Keyword 
Sql :: oracle change tablespace size 
Sql :: mysql regex exact match 
Sql :: mysql locate 
Sql :: rollback in sql 
Sql :: select from select sql server 
Sql :: sql select if not exists 
Sql :: download sql server for mac 
Sql :: print hello world in sql 
Sql :: sql create table with data 
Sql :: multiple count with where clause sql 
Sql :: psql select * from table 
Sql :: mongodb vs mysql 
Sql :: tablas bootstrap responsive sql server para datos vivos 
Sql :: array of objects sql 
Sql :: select into 
Sql :: select the date 30 days less that the todays date sql request 
Sql :: mysql count unique in group statement 
Sql :: select value from previous row in postgresql 
Sql :: sqlite commands 
Sql :: delete from table sql 
Sql :: mysql limit order by 
Sql :: how to delete database in mysql 
Sql :: initcap in sql 
Sql :: drush SQLSTATE[HY000] [2002] No such file or directory 
Sql :: sql row having max 
Sql :: case statement in select query in sql 
Sql :: mysql create table if not exists 
Sql :: sql select 
Sql :: what is denormalization in sql 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =