rspec/rules/S1590/plsql/rule.adoc

24 lines
349 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
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;
/
----