Answer Posted / shashi kishor prasad
1.Stored Procedures are Pre-compiled functions that needs to
be called but Triggers are event driven and can't be called
explicitly like stored procedures
2.Stored procedures can take arguments but Triggers dont
take arguments.
3.Stored procedures cant get executed unless they are called
by by the calling program but Triggers gets fired as soon as
an event for which it has been created takes place.
4. Stored procedures can work on the database and values it
has been assigned but Triggers can work on db other than that.
5.Stored Procedures are used to make the execution faster
and to prevent from sql injections to some extent but
Triggers are used to achieve different tasks on occurrence
of an event like insert update and delete on a table.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration
What are trace flags and mention a few common trace flags used with sql server?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
What is an active database?
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
Why use “nolock” in sql server?
What is delete query?
How would you choose between a clustered and a non-clustered index?
How to execute a sql statement using odbc_exec()?
What is the use of floor function in sql server?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
what types of replication are supported in sql server? : Sql server database administration
What is the language structure to add a record to a table?
How does the report manager work in SSRS?
Why are you getting errors when creating a new odbc dsn?