Posts
33
Comments
186
Trackbacks
0
Update Query in SQL with SELECT statement
UPDATE 
   
Table 
SET 
   
Table.col1 = other_table.col1, 
   
Table.col2 = other_table.col2 
FROM 
   
Table 
INNER JOIN 
    other_table 
ON 
   
Table.id = other_table.id 
posted on Tuesday, March 13, 2012 4:16 PM Print
Comments
Gravatar
# re: Update Query in SQL with SELECT statement
Ike
3/13/2012 9:55 PM
if on mssql, the following would also work


UPDATE
Table
SET
Table.col1 = other_table.col1,
Table.col2 = other_table.col2
FROM
other_table
where
Table.id = other_table.id
Gravatar
# re: Update Query in SQL with SELECT statement
Vision Express
2/4/2013 11:47 AM
I don't see the word SELECT anywhere!

Post Comment

Title *
Name *
Email
Comment *  
Verification