AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Wednesday, October 12, 2005

Confusing SQL Server trigger behavior

I have build a trigger for SQL Server table, where I count a number of records updated and deleted, then I open different kinds of cursors and do some data modifications. And once I found that this trigger run, even if you execute a DELETE statement, which deletes nothing, say:
Delete From Table1 Where ID=0, where there are no records with ID=0.
In this case both tables Inserted and Deleted have no records, but trigger still runs! Why?
Well, maybe it is only confusing to me…

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home