-20211 THE SPECIFICATION ORDER BY, OFFSET, OR FETCH FIRST N ROWS ONLY IS INVALID
Explanation
An ORDER BY, OFFSET, or FETCH FIRST n ROWS ONLY clause is not allowed:
- In the outer fullselect of a view definition
- In a subselect that is not the outermost fullselect
- In the outer fullselect in the RETURN statement of an SQL table function
An OFFSET or FETCH FIRST n ROWS ONLY clause is not allowed:
- In the outer fullselect of a materialized query table definition
System action
The statement cannot be processed.
Programmer response
Correct the failing statement. If the failing statement is CREATE VIEW, specify the invalid clause in SQL statements that refer to the view instead.
SQLSTATE
428FJ