................................................................ It‘s a age of economic globalization and Infomation globalization........................................
问:从表中的最后一个记录开始,往上数第50个记录,提取它,这个SQL语句怎样去写,谢谢专家解答!
答:如果表中没有自动增长型字段可以这样实现
insert into #t from table
declare @cnt intset @cnt=@@rowcount-50set rowcount @cntdelete from #tset rowcount 0select * from #t
drop table #t
如果,只要第50条那一条记录
如果有id的话,试试
posted on 2006-10-03 18:53 Technical Consultant 阅读(195) 评论(0) 编辑 收藏 引用 所属分类: Database
Powered by: C++博客 Copyright © Technical Consultant