insert into:
新增数据部分为表中已有数据
Insert into table1 (id,updateUser,updateTime)select id ,updateUser,@UpdateTime from table1 where id=‘1’
查询表中某字段含有重复的数据的值和重复的条数
select count(a),a from tablea group by a
类似于distance 的实现
select COLUMN from (select ROW_NUMBER() OVER(PARTITION BY COLUMN ORDER BY COLUMN) as id,COLUMN from table) as a where a.id=1
SQL SERVER 查询 15K 数据 DISTiNCT 0.017s
自己方法 0.014s