Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Triggers on Views

Status
Not open for further replies.

Ritsy

Programmer
Jul 10, 2001
1
US
We all know that triggers can be created in the following case :
Create trigger on Table A at row level to insert a row into it each time a row is inserted in Table B.

Can we also create triggers for :
Need to insert a row into Table A each time a row is created in underlying table(s) of View B. And say that the tables that make up the view B are dynamically created each month with the name constantly changing and thus cannot be accessed in the trigger.
 
which version of sql server? is it SQL 7.0 is so u cannot create triggers on views. No idea on SQL2K

dbtech
 
Hi Ritsy,
It is true that you can not create trigger on VIEWs. But i think it is not required also. Because if yous insert/ update/ delete affects the underlyne base table then the triggers on underlyne base table will automatically get executed.

Hope this will bring you out from confusion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top