-1

次のクエリの実行中に構文エラーが発生しましたか?

select *
    from (select row_number() over (order by title) as RowNum  from question)
    where RowNum>5

誰でもそれを修正する方法を知っていますか?

4

3 に答える 3

1

次のようにサブクエリALIASに渡します。

SELECT *
FROM (SELECT row_number() OVER (ORDER BY title) AS RowNum  FROM question) AS t1
WHERE RowNum>5
于 2012-10-15T03:55:41.040 に答える
0
;With CTE AS
(

    select row_number() over (order by title) as RowNum  from question
)
select * 
From Cte
Where RowNum > 5

また

Select * From
(select row_number() over (order by title) as RowNum  from question)X
Where X.RowNum > 5
于 2012-10-15T05:11:53.527 に答える
0

サブクエリで TABLE から COLUMNS を選択すると役に立ちますよね?

select *
from (
    select *, row_number() over (order by title) as RowNum
    from question) SQ
where RowNum > 5
于 2012-10-15T04:59:37.083 に答える