摘要:
假设存在一个主键ID,Name为重复列,下面这句可以查出所有的没有重复的数据: select * from 表 as a where ID=(select min(ID) from 表 where Name=a.Name) 。 根据上面这句就可以删除所有重复项的数据: delete from 表 w 阅读全文
摘要:
1.Sql中getDate()在查询语句中的用法 select * FROM V_MANAGERPLAN where (SEAT_ID in (45,46)) and (GETDATE() between BeginTime and EndTime) order by Shift_sortid,se 阅读全文
摘要:
1 use master 2 go 3 if(exists (select * from sys.databases where name = 'testHome')) 4 drop database testHome 5 go 6 create database testHome 7 on( 8 阅读全文