On Triggers | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

On Triggers

Hi, Can we pass parameters to the triggers. In my current scenario i am updating a column in a table, what the work to be done is when that column is updated i must update some other column, for this i should have the rowid of last updated. How can i achieve this????? Regards
Read "Books On Line" – it gets installed along with the rest of SQL Server, or you can install it as part of the "Client Tools" installation. (I think there’s even a download on Microsoft’s website.)<br /><br />Look up the entry on CREATE TRIGGER, and pay special attention to the section where they explain the use of the "inserted" and "deleted" conceptual tables, and the UPDATE(&lt;column_name&gt<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ /> function.<br /><br />So (1) you can’t pass parameters to triggers,<br />and (2) you already have all you could ever need in a trigger by virtue of the conceptual tables and the UPDATE() function.
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx for the 2000 BOL.<br /<a target="_blank" href=http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx>http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx</a> for 2005. [<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br /><br />–<br />Frank Kalis<br />Microsoft SQL Server MVP<br /<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a><br />Heute schon gebloggt?<a target="_blank" href=http://www.insidesql.de/blogs>http://www.insidesql.de/blogs</a><br />