Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 1 trigger or many

Author  Topic 

Tim
Starting Member

392 Posts

Posted - 2002-03-15 : 22:42:30
Is there any advantage to combining multiple triggers into one?

Let's say I have to validate two columns using triggers. Would one trigger that checks both columns be better than two separate triggers, one per column?

thx

nr
SQLTeam MVY

12543 Posts

Posted - 2002-03-16 : 10:12:28
One trigger would be easier to manage.

If something goes wrong you may end up looking through lots of triggers to find out what caused it and also may end up putting code in that has to run before code in another trigger.
Remember that at some point someone else will be working on the system and it will be easier to follow with a single trigger (or none).

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -