Difference between revisions of "TRUNCATE TABLE"

From Lianjapedia
Jump to: navigation, search
(Created page with "==Purpose== Deletes all rows from a table ==Syntax== TRUNCATE TABLE [<database>!]<table> ==See Also== ADD TABLE, CLOSE, CREATE DATABASE, D...")
 
Line 33: Line 33:
 
[[Category:SQL|TRUNCATE TABLE]]
 
[[Category:SQL|TRUNCATE TABLE]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Lianja v2.0]]

Revision as of 08:13, 4 September 2015

Purpose

Deletes all rows from a table

Syntax

TRUNCATE TABLE [<database>!]<table>

See Also

ADD TABLE, CLOSE, CREATE DATABASE, DECLARE CURSOR, DELETE, DROP CURSOR, EXECUTE IMMEDIATE, FETCH, GETENV(), INSERT, OPEN, OPEN DATABASE, SET AUTOCATALOG, UPDATE, USE, ZAP

Description

The TRUNCATE TABLE command executes an immediate physical deletion of all the records in the table i.e., records are permanently removed from the table, and cannot be recalled.

It is the equivalent of the NoSQL ZAP command.

Introduced in Lianja v2.0.

Keywords Description
database The name of the database to which the table belongs. The '!' character must be included between the database name and the table name.
table The name of the table from which to delete the rows.

Example

truncate table southwind!temp