select * from
(select row_number() over (order by id asc) as r ,* from web_helpcategory where headid=0 ) as tem
where tem.r=2 -------返回執行行號的數據
select ROW_NUMBER() over (order by id asc )as rowId,* from web_helpcategory where headid=0 ----------返回帶行號的數據
select identity(int,1,1) as rowId,* from web_helpcategory where headid=0 ----------返回帶行號的數據