SP's Microsoft SQL Server Tips & Tricks
Tuesday, August 17, 2010
Update Multiple Column
MS SQL Update Multiple Column in single shot
*****************
UPDATE MyTable
SET (Col1, Col2, Col3, Col4) = (SELECT a, b, c, d FROM Mytable2 WHERE e =Mytable.Col5)
WHERE Col5 IN (SELECT d FROM Table2 )
*****************
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment