what is the difference between trigger and storedprocedures
Answer Posted / sunny kumar rana
1) A stored procedure can accept parameters while a trigger
cannot.
2) A trigger can’t return any value while stored procedures
depand on condition.
3) A trigger is executed automatically on some event while
a stored procedure needs to be explicitly called.
4) Triggers are used for insertions, update and deletions
on tables while stored procedures are often using
independently in the database.
5) A trigger cannot be written in a stored procedure.
However, the reverse is not possible.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the types of keys?
Why do we use sqlite?
What is Collation Sensitivity ? What are the various type ?
How do I add a primary key to a table?
how to do backup entire database? : Transact sql
How can we make an if statement within a select statement?
What is serial sql?
How much ram can sql express use?
how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba
What is application trigger?
What is pl sql script?
Advantages and disadvantages of stored procedure?
when MSQL8.0 is in market
what are the authentication modes in sql server? How can it be changed? : Sql dba
define sql insert statement ? : Sql dba