rspec/rules/S1590/plsql/rule.adoc
2020-06-30 17:16:12 +02:00

24 lines
349 B
Plaintext

include::../description.adoc[]
== Noncompliant Code Example
----
DECLARE
maxAge PLS_INTEGER := 60;
BEGIN
UPDATE employee SET status = 'retired'; -- Noncompliant - the WHERE was forgotten
END;
/
----
== Compliant Solution
----
DECLARE
maxAge PLS_INTEGER := 60;
BEGIN
UPDATE employee SET status = 'retired' WHERE age > maxAge;
END;
/
----