rspec/rules/S1496/rule.adoc
2021-01-27 13:42:22 +01:00

17 lines
373 B
Plaintext

``++UPDATE dbtab SET ...++`` without a ``++WHERE++`` condition changes all the entries of the table. Check whether dataset to be changed can be limited by a suitable ``++WHERE++`` condition.
== Noncompliant Code Example
----
UPDATE COUNTRIES SET NAME=country_name.
----
== Compliant Solution
----
UPDATE COUNTRIES SET NAME=country_name WHERE CODE=country_code.
----