摘要:
--第一declare @orderNum varchar(255)create table #ttableName(id int identity(1,1),Orders varchar(255))declare @n int,@rows intinsert #ttableName(orders) select orderNum from pe_Orders where orderId<50--select @rows=count(1) from pe_Ordersselect @rows =@@rowcountset @n=1while @n<=@rowsbegin selec 阅读全文