There's no point in including the default value of a column in an insert statement. It simply clutters the code to no additional benefit.


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


== Noncompliant Code Example

With the table ``++PRODUCT++`` having a column ``++INV_COUNT++`` with default ``++0++``:

----
EXEC SQL
  INSERT INTO PRODUCT
  (
    NAME,
    INV_COUNT  -- Noncompliant
  )
  VALUES
  (
    :PROD-NAME,
    0  -- this is the default value
  )
END-EXEC
----


== Compliant Solution

----
EXEC SQL
  INSERT INTO PRODUCT
  (
    NAME
  )
  VALUES
  (
    :PROD-NAME
  )
END-EXEC
----



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

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