Hi,

mysql> create table t(i int);

mysql> insert into t values(1),(2),(3);

mysql> select i, if(i <= 1, 'low', 'high') from t order by i;
+------+---------------------------+
| i    | if(i <= 1, 'low', 'high') |
+------+---------------------------+
|    1 | low                       |
|    2 | high                      |
|    3 | high                      |
+------+---------------------------+
3 rows in set (0.06 sec)

Take a look at the documentation for IF(),
  http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html

All the best,
-Janek, CMDEV 5.0.
StudyLink. Helping People Realise Their Potential.
http://studylink.com

On Mon, 2009-05-18 at 09:55 +0530, bharani kumar wrote:
> Hi all ,
> 
> Can u give one example query ,
> 
> Which contain the IF condition ,
> 
> Because here before am not used the IF and all ,
> 
> 
> Thanks
> 
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to