Skip to content

G-3115: Avoid self-assigning a column.

Blocker

Maintainability

Reason

There is normally no reason to assign a column to itself. It is either a redundant statement that should be removed, or it is a mistake where some other value was intended in the assignment.

One exception to this rule can be when you attempt to fire cross edition triggers when using Edition Based Redefinition.

Example (bad)

1
2
update employees
   set first_name = first_name;

Example (good)

1
2
update employees
   set first_name = initcap(first_name);