SQL Differences between stored procedure and triggers

前端 未结 13 1323
北荒
北荒 2021-01-30 20:38

I\'m having trouble understanding the difference between a stored procedure and a trigger in sql. If someone could be kind enough to explain it to me that would be great.

<
13条回答
  •  鱼传尺愫
    2021-01-30 21:38

    Difference Between a Stored Procedure and a Trigger

    We can define a trigger as a database object just like a stored procedure, or we can say it is a special kind of stored procedure which fires when an event occurs in a database. We can execute a SQL query that will "do something" in a database when an event is fired.

        Triggers are fired implicitly while stored procedures are fired explicitly.
    

提交回复
热议问题