Using FETCH FIRST n ROWS ONLY
in a SELECT
without ordering the results from which the "n first" results are chosen will
return a seemingly random set of rows, and is surely a mistake.
Noncompliant code example
SELECT fname, lname, city
FROM people
WHERE city IS NOT NULL
FETCH FIRST 10 ROWS ONLY; -- Noncompliant selects 10 random rows
Compliant solution
SELECT fname, lname, city
FROM people
WHERE city IS NOT NULL
ORDER BY birthdate DESC
FETCH FIRST 10 ROWS ONLY;