我想实现的功能:
从第一条记录开始,添加序号“.....1”,以后每查询一条记录,便将序号自动加1,
比如如果有5条记录,则第5条记录的序号为“.....5”,那么该如何修改下面是SQL Code 才能实现这个效果呢?SET   NOCOUNT   ON   
DECLARE  @i int
set @i=1
DECLARE authors_cursor cursor scroll dynamic 
for 
select '.....'+ convert(varchar,@i) as [序号],[Description],[quantity] from [a_p] 
for update
open authors_cursor
fetch next from authors_cursor 
while @@fetch_status=0
begin
fetch next from authors_cursor 
set @i=@i+1
end
close authors_cursor
deallocate authors_cursor
期待高手帮忙,不胜感激……