DELETE id FROM 表1 WHERE id not in (select min(id) from 表1 group by title)
删除title 重复的
DELETE id FROM 表1 WHERE id not in (select min(id) from 表1 group by title)
删除title 重复的
Access:
select * From 表 Where id in(1,5,3) order by instr(',1,5,3,',','&id&',')
MSSQL:
select * From 表 Where id in(1,5,3) order by charindex(','+rtrim(cast(id as varchar(10)))+',',',1,5,3,')
SQL语句如下:
DELETE FROM T_S_POS_SHOPRECODE A
WHERE (A.POSID, A.SHOPTIME, A.CARDID) IN
(
SELECT POSID, SHOPTIME, CARDID
FROM T_S_POS_SHOPRECODE
最新评论