include::description.adoc[]

include::ask-yourself.adoc[]

include::recommended.adoc[]

== Sensitive Code Example

----
SELECT * FROM db_persons INTO us_persons.
----


== Compliant Solution

[source,text]
----
SELECT * FROM db_persons INTO us_persons WHERE country IS 'US'.
----


== Exceptions

``++SELECT SINGLE++`` and ``++UP TO 1 ROWS++`` result in only one record being read, so such ``++SELECT++``s are ignored by this rule.

----
SELECT SINGLE * FROM db_persons INTO us_persons.

SELECT * FROM db_persons UP TO 1 ROWS INTO us_persons.
----

