views:

46

answers:

2

Is it possible to Use cursor in triggers in MySQL? Is it recommended? as someone told me its helpfull to use cursor in triggers for auditing

I need this for auditing...

EDIT

is it helpful to use cursor in triggers for auditing? If Yes then How?

Please help .. Thank You

+2  A: 

Short answer yes, what else you wanna know?

Gandalf StormCrow
is it helpful to use cursor in triggers for auditing? If Yes then How?
OM The Eternity
+1  A: 

There's can you and should you. You can probably put system calls and web service calls in there too. You're taking just about the heaviest drag on SQL database performance and inserting it into the feature that's considered to be the lightest-weight, fastest feature. You'd best be prepared to have a very good reason.

le dorfier
Just playing a blind Game @le dorfier I haveno idea of this I m just investingating "what if"... and lots "why"... i need to do the Auditing using triggers, someone suggested me for using Cursor in it it will help me, but I dont know how will that help in it...
OM The Eternity
Google for "cursors considered harmful". (For that matter, google for "triggers considered harmful".) You're talking about two of the most potentially dangerous features of a database if not handled with extreme care - and one is by definition procedural, and the other relentlessly set-oriented.
le dorfier