MySQL Forums
Forum List  »  Microsoft SQL Server

CASE WHEN?
Posted by: Dominic Shaw
Date: October 09, 2006 12:13PM

Is there a CASE construct in MySQL similar to that of SQL Server's?

CASE WHEN field1 = 0 THEN 'output1' ELSE 'output2' END

and

CASE field1
WHEN 1 THEN 'output1'
WHEN 2 THEN 'output2'
WHEN 3 THEN 'output3'
END

Any help would be very welcome!

Thanks,

Dom

Options: ReplyQuote


Subject
Written By
Posted
CASE WHEN?
October 09, 2006 12:13PM
October 09, 2006 12:58PM


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.