开发者

i try to select some rows in tables - and get error

开发者 https://www.devze.com 2023-01-26 08:52 出处:网络
i have table that i map her with numbers. i need to see rows from 13 to 20 i try this: selectFname,Lname,rollet,

i have table that i map her with numbers.

i need to see rows from 13 to 20

i try this:

select  Fname,Lname,rollet,
ROW_NUMBER() OVER(ORDER BY rollet) AS RowID
from BackUp2 
where RowID between 13 and 20

and i get this error:

Msg 207, Level 16, State 1, L开发者_StackOverflowine 5
Invalid column name 'RowID'.
Msg 207, Level 16, State 1, Line 5
Invalid column name 'RowID'.

what i can do ?


select *
from ( select 
  Fname,Lname,rollet,
ROW_NUMBER() OVER(ORDER BY rollet) AS RowID
from BackUp2 ) xx

where xx.RowID between 13 and 20
0

精彩评论

暂无评论...
验证码 换一张
取 消