TRUNCATE TABLE

From Lianjapedia
Jump to: navigation, search

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 but differs in that the table does not need to be already open, so it can be used from ODBC connections to a Lianja server.

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