"Qiang.zhou" <[EMAIL PROTECTED]> wrote:
> Dear All;
>
> At oracle8i i can write this sql:
> select decode(a.id,null,'NULL',2,"God',3,'Norma','Animal') from user
>
> Then i want know ,how to write this at mysql4.1
Use IF() or CASE to rewrite your query:
http://www.mysql.com/doc/en/Control_flow_functions.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]