Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql on duplicate key update

INSERT INTO t1 (a,b,c) VALUES (1,2,3)
  ON DUPLICATE KEY UPDATE c=3;
INSERT INTO t1 (a,b,c) VALUES (4,5,6)
  ON DUPLICATE KEY UPDATE c=9;
Comment

mySql on duplicate key update

INSERT INTO table (column_list)
VALUES (value_list)
ON DUPLICATE KEY UPDATE
   c1 = v1, 
   c2 = v2,
   ...;
Comment

mysql on duplicate key ignore

INSERT INTO table_tags (tag) VALUES ('tag_a'),('tab_b'),('tag_c') ON DUPLICATE KEY UPDATE tag=tag;
Comment

mysql on duplicate key update

UPDATE t1 SET c=c+1 WHERE a=1 OR b=2 LIMIT 1;
Comment

PREVIOUS NEXT
Code Example
Sql :: location of the log postgresql linux 
Sql :: mysql if else 
Sql :: oracle create tablespace autoextend 
Sql :: select case when oracle 
Sql :: sql delete 
Sql :: like in postgresql 
Sql :: How to find string in substring in sql server 
Sql :: convert html to plain text in sql server 
Sql :: dbms_metadata.get_ddl table 
Sql :: postgres parent and child tables 
Sql :: oracle show errors compilation 
Sql :: sql inner join 
Sql :: update sql sintax 
Sql :: sql order by with where 
Sql :: show tablespace oracle 
Sql :: PostgreSQL: To_Number function 
Sql :: oracle sql unique 
Sql :: top 3 salary in sql 
Sql :: mysql insert rows to another database 
Sql :: Create the connection pool mysql2 
Sql :: make parameters nullable in sql server 
Sql :: order by sql query 
Sql :: Write SQL in ruby on rails 
Sql :: sql server datetime vs datetime2 
Sql :: timestamp datatype in sql 
Sql :: sql server delete records with specific date 
Sql :: forgot postgres password 
Sql :: como hacer un select entre fechas mysql 
Sql :: intersect sql 
Sql :: how to average max mysql 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =