SQL

How to take contents of select and use in a delete


delete from FooRole where Id IN (select ur.Id from FooRole ur, Role r where userId = 5 AND ur.RoleId = r.Id)

UPDATE Path
SET [TypeId] = 1
WHERE Id IN (select Id from Path where TypeId = 2)

Advertisements
%d bloggers like this: