比如说3条数据,我怎么知道到了第二条,或者第三条!?? ------------------------------------- declare @id int set @id=0 --处理游标的过程中每次处理都加一 set @id=@id+1不就可以根据@id判断目前第几行了.就是查询分析器出来结果最左边的那序列!我要在数据相里面表现出来! ----------------------------- create table test(id int identity--你结果集中的其他字段) insert into test select -- 以下为你得到结果集的语句select * from test--现在的结果集就有你想要的序号了.
select id=identity(int,1,1),* into #T from table select * from #T
比如说3条数据,我怎么知道到了第二条,或者第三条!??
-------------------------------------
declare @id int
set @id=0
--处理游标的过程中每次处理都加一
set @id=@id+1不就可以根据@id判断目前第几行了.就是查询分析器出来结果最左边的那序列!我要在数据相里面表现出来!
-----------------------------
create table test(id int identity--你结果集中的其他字段)
insert into test
select -- 以下为你得到结果集的语句select * from test--现在的结果集就有你想要的序号了.
select * from #T