Difference between Triggers and Stored Procedure
Answer Posted / bed singh
1. Triggers can only be implemented on tables or views but
Stored Procedure in independent code that can be specific
to database.
2. Triggers are automatically run but stored procedures are
not automatically run and they have to be called explicitly
by the user.
3. we can write a stored procedure within a trigger but
cannot write a trigger within a stored procedure.
4. Trigger is attached to table or view and is fired only
when an INSERT, UPDATE, and/or DELETE occurs, while a
stored procedure executes at any time when it is called.
| Is This Answer Correct ? | 75 Yes | 9 No |
Post New Answer View All Answers
How can we migrate from SQL server to SQL Azure?
Define union, union all, minus, intersect?
What stored procedure would you use to view lock information?
Explain how to send email from sql database?
Explain what are magic tables in sql server?
Explain what is public role in sql server?
What are Spatial data types in SQL Server 2008
What is logon trigger?
How to change parameter value inside the report?
Difference between LEN() and DATALENGTH() in sql server ?
after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?
Explain having clause?
Is sql server free?
How do you check sql server is up and running?
how can you check the level of fragmentation on a table? : Sql server administration