mysql> mysql> SELECT IF(STRCMP('test','test1'),'no','yes'); +---------------------------------------+ | IF(STRCMP('test','test1'),'no','yes') | +---------------------------------------+ | no | +---------------------------------------+ 1 row in set (0.00 sec) mysql> mysql> mysql>