0% found this document useful (0 votes)
8 views1 page

Materialized View Log

The document outlines the syntax and semantics of the TRUNCATE TABLE command in Oracle Database, detailing how to specify the schema and table name, and the implications of truncating various types of tables. It explains the effects on indexes, including marking them as UNUSABLE and subsequently resetting them after truncation. Additionally, it notes the handling of LOB data and provides references for further information on domain indexes.

Uploaded by

Venkat Kv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Materialized View Log

The document outlines the syntax and semantics of the TRUNCATE TABLE command in Oracle Database, detailing how to specify the schema and table name, and the implications of truncating various types of tables. It explains the effects on indexes, including marking them as UNUSABLE and subsequently resetting them after truncation. Additionally, it notes the handling of LOB data and provides references for further information on domain indexes.

Uploaded by

Venkat Kv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

truncate_table::=

TRUNCATE TABLE
schema .
table
PRESERVE
PURGE
MATERIALIZED VIEW LOG
DROP
ALL
REUSE
STORAGE
CASCADE
;
Semantics
TABLE Clause
Specify the schema and name of the table to be truncated. This table cannot be
part of a
cluster. If you omit schema, then Oracle Database assumes the table is in your
own schema.
• You can truncate index-organized tables and temporary tables. When you
truncate a
temporary table, only the rows created during the current session are removed.
• Oracle Database changes the NEXT storage parameter of table to be the size of
the last
extent deleted from the segment in the process of truncation.
• Oracle Database also automatically truncates and resets any existing
UNUSABLE indicators
for the following indexes on table: range and hash partitions of local indexes and
subpartitions of local indexes.
• If table is not empty, then the database marks UNUSABLE all nonpartitioned
indexes and all
partitions of global partitioned indexes on the table. However, when the table is
truncated,
the index is also truncated, and a new high water mark is calculated for the
index segment.
This operation is equivalent to creating a new segment for the index. Therefore,
at the end
of the truncate operation, the indexes are once again USABLE.
• For a domain index, this statement invokes the appropriate truncate routine to
truncate the
domain index data.
See Also:
Oracle Database Data Cartridge Developer's Guide for more information on
domain indexes
• If a regular or index-organized table contains LOB columns, then all LOB data
and LOB

You might also like