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.
<
Think of a stored procedure like a method in an object-oriented programming language. You pass in some parameters, it does work, and it can return something.
Triggers are more like event handlers in an object-oriented programming language. Upon a certain condition, it can either (a) handle the event itself, or (b) do some processing and allow for the event to continue to bubble up.