Question6: How can I add

14 查阅
Question6: How can I add row numbers to my result set?In database pubs, have a table titles , now I

参考答案:

正确答案:
Answer 6:
--SQL 2005的写法
select row_number() as line_no ,title_id from titles
--SQL 2000的写法
select line_no identity(int,1,1),title_id into #t from titles
&n