MySQL Forums
Forum List  »  InnoDB

Re: "if" condition in SELECT ?
Posted by: William Chiquito
Date: September 07, 2007 08:51AM

Hi Margarita,

Try:
   SELECT IF(field1 IS NULL, field2, field1) FROM table1;

Options: ReplyQuote


Subject
Views
Written By
Posted
27053
September 07, 2007 08:38AM
Re: "if" condition in SELECT ?
16641
September 07, 2007 08:51AM
11128
September 07, 2007 10:09AM


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.