回覆列表
  • 1 # 財富人111222

    sql1=select * from (select *, row_number() over(order by username ) as rowNumber from users where regfrom="&admin&") as t where t.rowNumber > 0 and t.rowNumber <= 0 + 30 order by username怎麼會有27 條記錄呢,除非你的表 一共就27條記錄吧。用遊標或臨時表--遊標declare youbiao1 for 查詢1open youbiao1fetch next from youbiao1 into 變數while @@FETCH_STATUS = 0begin 裡面一次套用end--臨時表declare @ID intset @ID = 1while Exists(select * from 表)begin --處理 -- set @ID = @ID + 1end

  • 中秋節和大豐收的關聯?
  • 測硫酸根離子的濃度?