Code Snippets
Tuesday, September 30, 2008
SQL 2005: Delete Records Using Another Table
DELETE tobeupdated_table FROM tobeupdated_table a
WHERE a.tableID = @ID_in
AND a.otherTableID IN
( SELECT otherTableID FROM otherTable b
WHERE b.someField = @someValue_in
);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment