解决方案 »
- 请教mysql 从Linux 服务器 迁移到 Windows2003 报错问题
- 求助:从SQLServer2005导出的sql文件如何导入MySQL
- mysql 客户端乱码
- 求sql语句
- 一个表中有100条记录这样查询表中的第80条到90条记录
- 请教个设置数据库在线人数问题。
- Access denied for user错误?
- 谁会用MySQL-Front,高手过来看看啊,崩溃啦!!!
- 我的BDE 连MYSQL怎么总是出现:key violation.[tcx][myodbc]access denied for user:'sa@机器名‘(using password:YES)
- 那么大神帮看看MYSQL查询语句问题
- 实在是搞不懂为什么?? 简直晕倒
- 求教mysql如何用If else实现replace into 功能
case ifnull(b.pric,0)>0 then b.pric
case ifnull(b._pric,0)>0 then b._pric
case ifnull(b.shop.pric,0)>0 then b.shop.pric
case ifnull(c.sele_pric,0)>0 then c.sele_pric end
order by
case when ifnull(b.pric,0)>0 then b.pric
case when ifnull(b._pric,0)>0 then b._pric
case when ifnull(b.shop.pric,0)>0 then b.shop.pric
case when ifnull(c.sele_pric,0)>0 then c.sele_pric end
case
when ifnull(b.pric,0)>0 then b.pric
when ifnull(b._pric,0)>0 then b._pric
when ifnull(b.shop.pric,0)>0 then b.shop.pric
when ifnull(c.sele_pric,0)>0 then c.sele_pric end
from a LEFT JOIN b on a.id=b.id LEFT JOIN c on b.id=c.id
order by COALESCE(b.pric ,b._pric ,b.shop.pric ,c.sele_pric )