Answers for "update multiple records in sql"

SQL
11

sql update record

UPDATE table_name
SET column1 = value1, column2 = value2...., columnN = valueN
WHERE [condition];
Posted by: Guest on June-04-2020
6

sql update record

SQL> UPDATE CUSTOMERS
SET ADDRESS = 'Pune'
WHERE ID = 6;
Posted by: Guest on June-04-2020
0

sql update multiple tables

/*You can't update multiple tables in one statement,
however, you can use a transaction to make sure that
two UPDATE statements are treated atomically.
You can also batch them to avoid a round trip.*/


BEGIN TRANSACTION;

UPDATE Table1
  SET Table1.LastName = 'DR. XXXXXX' 
FROM Table1 T1, Table2 T2
WHERE T1.id = T2.id
and T1.id = '011008';

UPDATE Table2
SET Table2.WAprrs = 'start,stop'
FROM Table1 T1, Table2 T2
WHERE T1.id = T2.id
and T1.id = '011008';

COMMIT;
Posted by: Guest on April-20-2021

Code answers related to "update multiple records in sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language