problem in trigger of chapter 6
The trigger shown below is used to set the user id =null so that we can update the UserID to Null value and rest of the corresponding feilds of User should be retain in database,but i got stucked in trigger u have written,why u used [u]deleted</u> in sub query
CREATE TRIGGER SetNewsAuthoeToNull ON [dbo].[Accounts_User]
FOR DELETE
AS
UPDATE News_News
SET UserID= NULL
WHERE UserID= (SELECT UserID FROM [u]Deleted</u>)
bel-india.com
|