Multiple-Statement and Iterated INSERT Requests - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Vantage provides statement independence for multiple-statement INSERT requests and iterated INSERT requests. Statement independence enables multiple-statement or iterated INSERT requests to roll back only the statements that fail within a transaction or multiple-statement request and not all of the individual statements within the transaction.

These forms of multiple-statement requests support statement independence:
  • INSERT; INSERT; INSERT;
  • BT; INSERT; INSERT; ET;
  • BT; INSERT; INSERT;
  • INSERT; INSERT; ET;
  • INSERT; COMMIT;
  • INSERT; INSERT; COMMIT;
The client software you are using must support statement independence to prevent all multiple-statement requests and iterated INSERT requests in a transaction or multiple-statement request from being rolled back. See the documentation for your client software for information on support for statement independence.

Most statement data errors resulting from multiple-statement INSERT requests only roll back failed requests within the transaction or multiple-statement request, but do not stop all of the statements within the transaction or request unless every INSERT request within the multiple-statement request stops because of data-related errors. The database does not roll back the transaction, only its INSERT requests.

Statement independence supports the following multiple-statement INSERT data error types:
  • Column-level CHECK constraint violations
  • Data translation errors
  • Duplicate row errors for SET tables
  • Primary index uniqueness violations
  • Referential integrity violations
  • Secondary index uniqueness violations
Statement independence is not enabled for multiple-statement INSERT requests into tables defined with the following options:
  • Triggers
  • Join indexes
Statement independence is also not supported for the following SQL features:
  • INSERT ... SELECT requests
  • SQL stored procedures