MySQL Forums
Forum List  »  MySQL Query Browser

Re: IF ELSE query
Posted by: kanishk kumar
Date: March 10, 2012 02:04AM

select amount as a from discount

but it is not compiling its showin

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if(a=='yes') { RETURN A ) else { RETURN B }' at line 2

the table name is discount n its structure is

id int(11) No None auto_increment
amount int(11) No None
active enum('yes','no') latin1_swedish_ci

kindly help me i am a beginner at mysql

Options: ReplyQuote

Written By
March 10, 2012 01:54AM
Re: IF ELSE query
March 10, 2012 02:04AM
March 10, 2012 12:44PM

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.