![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql编程
iteye_13416
这个作者很懒,什么都没留下…
展开
-
sql学习
1、空值转换 返回第一个非空值 select coalesce(col,v1,v2..) from xxxx 2、select if判断 select case where 逻辑判断 then 结果 case where 逻辑判断 then 结果 else 结果 end from xxxx...原创 2012-12-07 09:17:11 · 52 阅读 · 0 评论 -
Sql去重语句
海量数据(百万以上),其中有些全部字段都相同,有些部分字段相同,怎样高效去除重复? 如果要删除手机(mobilePhone),电话(officePhone),邮件(email)同时都相同的数据,以前一直使用这条语句进行去重: 1 delete from 表 where id not in 2 (select max(id) from 表 group by mobilePhone,of...原创 2013-12-31 14:01:35 · 452 阅读 · 0 评论