I have a table A
and a user defined table type on which a table value parameter (tvp) tvpA
is based. Both have the same column structure except that tvpA
is not defined with any constraint.
What I'd like to do is to delete rows in A
that are not in tvpA
based on one of their field called ID
.
How can I do that ?
1 Answer 1
Is there a reason this simple correlated delete statement won't do the trick?
DELETE A
FROM TABLE_A A
WHERE NOT EXISTS (
SELECT *
FROM TVP_A
WHERE ID = A.ID
)
Explore related questions
See similar questions with these tags.