日期:2014-05-17  浏览次数:20403 次

sql语句中删除两条记录,id不连续
要删除一张数据表中的第5、6条数据,用sql语句实现(id不是连续的),表名:Tb_num
各位帮个忙,谢谢了!

------解决方案--------------------
SQL code
;with tt
as
(select * ,px=row_number()over(order by (select 1))
 from tb)
delete tt
where px between 5 and 6