Saturday, January 17, 2009

Trigger and Cursor

create trigger DeleteTrg
on musteri
instead of delete
as
declare @myid int;
declare id_cursor cursor
for
select ID from deleted;
open id_cursor;
fetch next from id_cursor into @myid;
while @@fetch_status=0
begin
print @myid;
fetch next from id_cursor into @myid;
end
close id_cursor;
deallocate id_cursor;

─░nstead of triggeri ile musteri tablomuzda silinen musterilerin ID lerini sqlserverda ekrana bas─▒yoruz.

No comments:

Post a Comment