mysql中IFNULL,IF,CASE的区别介绍
假设有一数据表的状态字段设计为varchar类型,有以下值:NULL,pending,pending refund,refund,cancel. 我们知道查询状态为cancel的订单,SQL语句可以这样写:SELECT o.oid,o.moneyreceipt,o.moneyget,o.thecur
假设有一数据表的状态字段设计为varchar类型,有以下值:NULL,pending,pending refund,refund,cancel. 我们知道查询状态为cancel的订单,SQL语句可以这样写:SELECT o.oid,o.moneyreceipt,o.moneyget,o.thecur