SQL Query With Row_Number, order by and where clause

后端 未结 5 1857
遥遥无期
遥遥无期 2021-01-21 03:33

I have the following SQL query:

select
     ID, COLUMN1, COLUMN2
from
     (select ID, COLUMN1, COLUMN2, row_number() over (order by 2 DESC) NO from A_TABLE)
whe         


        
5条回答
  •  迷失自我
    2021-01-21 03:38

    Why don't you use

    Select top 100 ID, Column1, Column2
    From A_Table
    where Column1 like '%value%'
    order by Column2 desc
    

提交回复
热议问题