Truncate (SQL)

From Wikipedia, the free encyclopedia

In SQL, the TRUNCATE statement removes all the data from a table. The TRUNCATE statement is not actually a part of the SQL standard, but many relational database management systems implement it. It is equivalent in function to a DELETE FROM my table; statement. However, on some systems, it is implemented differently.

[edit] See also

In SQL Truncate statement doesn't delete the content of a table which is to be truncated while it removes the address of the table from the list containing addresses to identify the table. That's why Truncate statement is 300 times faster than Delete statement of SQL because Delete statement removes the content of table one-by-one[specify].

Truncate Table [schema][.] <table_name>;


Topics in database management systems (DBMS)view  talk  edit )

Concepts
Database • Database model • Relational database • Relational model • Relational algebra • Primary key, Foreign key, Surrogate key, Superkey, Candidate key • Database normalization • Referential integrity • Relational DBMS • Distributed DBMS • ACID

Objects
Trigger • View • Table • Cursor • Log • Transaction • Index • Stored procedure • Partition

Topics in SQL
Select • Insert • Update • Merge • Delete • Join • Union • Create • Drop

Implementations of database management systems

Types of implementations
Relational • Flat file • Deductive • Dimensional • Hierarchical • Object oriented • Temporal • XML data stores

Components
Query language • Query optimizer • Query plan • ODBC • JDBC

Database products

Apache Derby • Berkeley DB • Caché • DB2 • db4o • DBase • eXtremeDB • Filemaker Pro • Firebird • Greenplum • H2 • Helix • Informix • Ingres • InterBase • Linter • Microsoft Access • Microsoft SQL Server • Mimer SQL • MonetDB • MySQL • Objectivity/DB • OpenLink Virtuoso • OpenOffice.org Base • Oracle • Oracle Rdb • Paradox • Perst • PostgreSQL • SQLite • Sybase IQ • Sybase • Teradata • UniVerse • Visual FoxPro


Other: Object-oriented (comparison) • relational (comparison)