rspec/rules/S3270/rule.adoc
2022-02-04 16:28:24 +00:00

24 lines
498 B
Plaintext

Using an ``++ORDER BY++`` clause in a ``++SELECT++`` helps ensure runtime reproducibility. Without one, _some_ databases _may_ return results in a consistent order, but it is likely to be one that appears random to users and is not optimal for processing the data.
== Noncompliant Code Example
[source,text]
----
SELECT model -- Noncompliant
FROM car
WHERE wheel_count = 4
----
== Compliant Solution
[source,text]
----
SELECT model
FROM car
WHERE wheel_count = 4
ORDER BY year, make
----