Technical Notes by Rogelio Prestol
ASP.NET, WebForms, Microsoft Ajax, C#, VB.NET, MSSQL
Wednesday, March 19, 2014
MSSQL: JOIN UPDATE / DELETE
1 2 3 4 5 6 7
UPDATE
a
SET
a.col = b.col
FROM
table1 a LEFT JOIN
table2 b
ON
a.id = b.id
1 2 3 4 5 6 7
DELETE
a
FROM
table1 a LEFT JOIN
table2 b
ON
a.id = b.id
WHERE
b.name =
'John Doe'
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment