row_number() over (order by ousp_id) 获取行号

select *from (select row_number() over (order by ousp_id) as rowNum,*
from YZOrder_OutStock_Product
where outs_no=@order_no)) as t
where rowNum = '1'

 

SQL 循环用while

while 1<100

begin

  

end

 

 

 

 

posted @ 2014-04-25 17:20  lengv10  阅读(5375)  评论(0编辑  收藏  举报