A primary key uniquely identifies a row in a database table, and should be considered immutable. Primary key values may be used in foreign keys in other tables, as well as in external systems. Changing such a value, even with the best of motivations, is likely to wreak havoc on the system's data integrity and potentially across other systems as well.


*Note* That this rule raises issues only when a database catalog is provided during the SonarQube analysis.


== Noncompliant Code Example

----
UPDATE USERS
  SET USER_ID = :new-id, USER_NAME = :new-name  *> Noncompliant
  WHERE USER_ID = :input
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
