如何删除表中前2000行,用sql?请高人指点,谢谢!

2025-01-02 04:48:07
推荐回答(3个)
回答1:

前2000行?需要有一个排序标准,如果没有就可以按照表的默认排序标准,
具体SQL语句如下:
delete from 表名
where id in
(select top 2000 id from tablename order by 排序标准字段)
呵呵,试一下,应该没有问题,^_^

回答2:

delete top 2000 from Table

回答3:

DELETE TABLENAME WHERE ID IN(SELECT TOP 2000 ID FROM TABLENAME)