在sql语句中,mysql 使用 if
而SQL server 使用iif
如
mysql : SELECT IF(1<2,'yes ','no'); sql server: SELECT IIF(1<2,'yes ','no');