|
Question : store procedure Vs. Triggers
|
|
hello everybody!!!
my is I want to analize which option I have to use between store proc and triggers, the point of interes is the speed in runtime.
Thank you in advace, Luis humberto Quevedo Asis de Mexico
|
|
Answer : store procedure Vs. Triggers
|
|
Stored procedure is called by you somewhere in your program. You can pass parameter and get result out using parameter.
Triggers are automatic in their nature. Triggers get executed automatically by an event on a table like INSERT/DELETE/UPDATE. You can not pass any parameter to trigger or expect any value from that.
Both are equally fast in execution. It depends how you define your bussiness rules and control. If you have trigger on a table it will event get executed when someone update/delete/insert data from 3rd party tool. but procedures are limited to your process and program. Triggers are more secure than Stored procedures.
|
|
|