Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql update two tables at once

UPDATE t1 LEFT JOIN t2 ON t1.id = t2.f_key
   SET t1.value = t1.value + 1,
       t2.value = t2.value + 1
 WHERE t1.id = condition
Comment

mysql update one table from another table multiple columns

 update  tabe2 set subject_id = (SELECT GROUP_CONCAT(sub_id SEPARATOR ', ') as sub_id FROM tabe1) 
Comment

PREVIOUS NEXT
Code Example
Sql :: How to pass password to mysql command line 
Sql :: empty table sqlite 
Sql :: android sqlite add column if not exists 
Sql :: oracle login as sysdba 
Sql :: json query 
Sql :: 3rd highest value in sql 
Sql :: how to know the character set of an oracle databes 
Sql :: version and edition of SQL Server Database Engine 
Sql :: Postgres - Login and connect as default user 
Sql :: mysql grant select update insert delete 
Sql :: sql server insert inner join 
Sql :: else if mysql 
Sql :: row to value to json in sql server 
Sql :: oracle table free space 
Sql :: sql select where in 
Sql :: get week day from date in sql 
Sql :: mysql delete rows 
Sql :: firebase query timestamp 
Sql :: allow null in psql 
Sql :: insert into select mysql 
Sql :: mysql vs postgresql 
Sql :: SQL Add Column in a Table 
Sql :: mysql get date from datetime 
Sql :: activate binary log mariadb 
Sql :: sql remove duplicates 
Sql :: mysql auto increment column 
Sql :: insert array into mysql column 
Sql :: mysql default value 
Sql :: add column table pl sql 
Sql :: tablas bootstrap responsive sql server para datos vivos 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =