MySQL Forums
Forum List  »  Stored Procedures

syntax error for simple IF - THEN
Posted by: Jassm Rahma
Date: June 01, 2016 11:49AM

Hi,

I am trying to creat a simple IF - THEN in MySQL but getting a synax error message.

can anyone help please...

here is my statement:

IF EXISTS (SELECT payroll_id FROM payroll WHERE location_id = param_location AND payroll_month = param_month AND payroll_year = param_year) THEN
SET param_payroll_id = 0;
END IF;


Thanks,
Jassim

Options: ReplyQuote


Subject
Views
Written By
Posted
syntax error for simple IF - THEN
3153
June 01, 2016 11:49AM


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.