MySQL Forums
Forum List  »  Triggers

Re: how to use declare in trigger
Posted by: Peter Brawley
Date: December 17, 2015 03:41PM

Sandeep, in the error message, MySQL tells you your declarations are illegal. For example variable names can't contain periods and wildcards, and the variables need to be typed. Did this code come from another SQL version? They're all different, you can't just copy such code from one to another. Have a look at the docs for stored routines and for legal identifiers.

It appears your four Selects can be combined into a single Join.

Also look at MySQL stored routine manual pages for error handling syntax.

Rick, the docs don't suggest code can be inserted between the tablename and For Each Row.

Options: ReplyQuote


Subject
Views
Written By
Posted
3801
November 19, 2015 03:28AM
1033
December 17, 2015 12:50PM
Re: how to use declare in trigger
1003
December 17, 2015 03:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.