== Why is this an issue?

In most databases, the SQL ``++TRUNCATE++`` statement has the following side effects:

* The table being truncated is locked during the operation
* The transaction log is not updated during the operation, which means that a TRUNCATE operation can't be part of a transaction.
* ``++DELETE++`` triggers are not fired during truncation

For these reasons use of the ``++TRUNCATE++`` statement may not be permitted in some environments. This rule flags all uses of the ``++TRUNCATE++`` statement.


=== Noncompliant code example

[source,text]
----
EXEC SQL TRUNCATE MY_TABLE END-EXEC.
----


=== Compliant solution

[source,text]
----
EXEC SQL DELETE FROM MY_TABLE END-EXEC.
----

ifdef::env-github,rspecator-view[]

'''
== Comments And Links
(visible only on this page)

=== on 14 May 2014, 09:32:40 Freddy Mallet wrote:
Waiting for additional explanations from BNP

=== on 27 May 2014, 13:03:31 Ann Campbell wrote:
I've expanded this one slightly - found a third reason not to truncate online and added a compliant solution. Please double-check me.

=== on 10 Jul 2014, 07:28:39 Freddy Mallet wrote:
We've finally decided to not support this controversial rule.


endif::env-github,rspecator-view[]
