Rabu, 23 November 2011

[MS_AccessPros] MS SQL Server Trigger

 

Hi,

I wanted to copy a record into another table when that record is being deleted. I tried to use MS SQL Server Trigger.

CREATE TRIGGER trg_CreateBackup ON dbo.T_Emp
FOR DELETE
AS
insert into T_EmpBkp Select EmpId,EmpName from T_Emp
where EmpId =(select EmpId from Deleted)

It is not working for me.

Thanks in advance.

Best,
Ozair

__._,_.___
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar