Given a consistent set of data, the results from any given database query will be consistent, but any random subset of that data may not be. Any time you perform a query that retrieves only the first n rows, without having ordered the data in the query, you're grabbing that random subset and putting the reliability of your program at risk. Thus queries that use ``++FETCH FIRST ... ROWS++`` must always include an ``++ORDER BY++``.


== Noncompliant Code Example

----
SELECT name   -- Noncompliant
FROM employee
WHERE sick_days > 5
FETCH FIRST 10 ROWS ONLY
----


== Compliant Solution

----
SELECT name
FROM employee
WHERE sick_days > 5
ORDER BY sick_days desc
FETCH FIRST 10 ROWS ONLY
----

