Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql update multiple rows

UPDATE table_name SET column1=value1, column2=value2 WHERE condition
Comment

update multiple columns in sql

UPDATE table-name SET column-name = value, column-name = value WHERE condition = value
Comment

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;
Comment

Update Multiple Rows

UPDATE Customers
SET country = 'NP'
WHERE age = 22;
Comment

PREVIOUS NEXT
Code Example
Sql :: including parameters in OPENQUERY 
Sql :: showing all columns in an sqlite table 
Sql :: like date sql server not working 
Sql :: big query get distinct array of objects 
Sql :: SQL create table full of dates 
Sql :: show * from table mysql 
Sql :: sql query to find difference between total no. of rows and distinct rows in sql server 
Sql :: representation arbres de requete en postgresql 
Sql :: VERIFY INDEXES WITH PARTITIONS IN SQL ORACLE 
Sql :: from weeknumber to date 
Sql :: oracle string substitution 
Sql :: datatype for phone number in sql 
Sql :: the primary key is selected from the 
Sql :: how to user id to show in from date to upto date in mssql server 
Sql :: pass array parameter to stored procedure c# 
Sql :: mysql faster insert 
Sql :: oracle foreign key reference table 
Sql :: SQL Creating a Procedure 
Sql :: sql server standard 
Sql :: import DB through mysql console 
Sql :: how to select the lowest values from table per client sql 
Csharp :: how ot make a variable public without showing in the inspector 
Csharp :: c# print hello world 
Csharp :: c# get username 
Csharp :: disappear after time unity 
Csharp :: create or update in laaravel 
Csharp :: unity how to set an objects postion x,y,z 
Csharp :: unity how to copy something to the clipboard 
Csharp :: loop through enum c# 
Csharp :: how to get an child of an gameobject 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =