![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sqlserver
Ilovejava888
这个作者很懒,什么都没留下…
展开
-
sqlserver日期函数
一、以前,我在比较两个datetime 类型数据A、B是否同年同月同日的方法是: where year(A) = year(B) AND month (A) = month(B) AND day(A) = day(B) 实际上可以用更简洁的方式实现 where datediff(day,A,B) = 0 同样,要比较A、B是否同年同月的方法是: where dated...原创 2009-06-24 17:28:46 · 109 阅读 · 0 评论 -
用SQL实现查询重复记录代码
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1) 2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来...原创 2009-07-11 12:28:10 · 154 阅读 · 0 评论 -
DDL DML DCL 区别
[b]DDL is Data Definition Language statements. Some examples: [/b] CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database ...原创 2009-07-12 12:15:33 · 95 阅读 · 0 评论