-
Notifications
You must be signed in to change notification settings - Fork 407
TRUNCATE TABLE
Daniël van Eeden edited this page Mar 13, 2024
·
5 revisions
No such statement in SQL standard, but it's widely supported across implementations:
TRUNCATE TABLE table_name
DB2:
TRUNCATE [TABLE] table_name
[DROP STORAGE | REUSE STORAGE]
[IGNORE DELETE TRIGGERS | RESTRICT WHEN DELETE TRIGGERS]
[RESTRICT WHEN DELETE TRIGGERS]
IMMEDIATE
Hive:
TRUNCATE [TABLE] table_name
[PARTITION partition_spec]
TRUNCATE [TABLE] table_name
[WAIT n | NOWAIT]
TRUNCATE [TABLE] table_name
N1QL:
No support for TRUNCATE
TRUNCATE TABLE table_name
[{PRESERVE | PURGE} MATERIALIZED VIEW LOG]
[{DROP [ALL] | REUSE} STORAGE]
[CASCADE]
TRUNCATE [TABLE] [ONLY] table_name ["*"] ["," ...]
[RESTART IDENTITY | CONTINUE IDENTITY]
[CASCADE | RESTRICT]
TRUNCATE [TABLE] table_name
TRUNCATE [TABLE] table_name
TRUNCATE [TABLE] [IF EXISTS] table_name
TRUNCATE TABLE table_name
[PARTITION "(" name "=" value [","...] ")"]
No support for TRUNCATE
TiDB:
TRUNCATE [TABLE] table_name
TRUNCATE TABLE table_name
[WITH "(" PARTITIONS "(" {partition_number | partition_number TO partition_number} ["," ...] ")" ")"]
TRUNCATE TABLE table_name