sql 查找自动增长的表中已经删除的记录的id
摘要:
create proc a as declare @i int,@c int set @i=1 set @c=(select MAX(id) from Table_1) while (@i<@c+1) begin select case when exists ( select id from Table_1 where id=@i) then '[[' else @i end set @i=@i+1 endexec a 阅读全文
posted @ 2012-05-23 11:42 面包机 阅读(320) 评论(0) 推荐(0) 编辑