Truncate table in Teradata

visibility 1,474 access_time 3 years ago languageEnglish timeline Stats
timeline Stats
Page index 1.93

In SQL Server, we can use TRUNCATE statement to clear all the records in a table and it usually performs better compared with DELETE statements as no transaction log for each individual row deletion.

The syntax looks like the following:

TRUNCATE TABLE { database_name.schema_name.table_name | schema_name.table_name | table_name }  

Equivalent in Teradata

Unfortunately Teradata doesn't provide TRUNCATE TABLE statement. The similar statement is:

warning In previous Teradata version, there is performance differences between DELETE and DELETE ALL; however they are not equivalents and there is no performance differences according to Andrew Livingston from Teradata!

Code snippet


copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

More from Kontext
Extract JSON Data via SQL Functions in Teradata
visibility 1,484
thumb_up 2
access_time 2 years ago
PostgreSQL: Create and List User
visibility 104
thumb_up 0
access_time 9 months ago
Create Multiset Temporary Table in Teradata
visibility 2,057
thumb_up 0
access_time 2 years ago