Difference between revisions of "ZAP"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Permanently remove all records from the active table
 
Permanently remove all records from the active table
 
  
 
==Syntax==
 
==Syntax==
 
ZAP
 
ZAP
 
  
 
==See Also==
 
==See Also==
[[CREATE]], [[DELETE]], [[DISPLAY PROTECTION]], [[LIST PROTECTION]], [[MODIFY STRUCTURE]], [[PACK]], [[SEQNO()]], [[SET EXCLUSIVE]], [[SET SAFETY]], [[SET SEQNO]]
+
[[DELETE]], [[DISPLAY PROTECTION]], [[LIST PROTECTION]], [[PACK]], [[SEQNO()]], [[SET EXCLUSIVE]], [[SET SEQNO]], [[SET SHARE]], [[TRUNCATE TABLE]]
 
+
  
 
==Description==
 
==Description==
The ZAP command permanently removes all of the records from the active table, without affecting the table structure.  ZAP is equivalent to DELETE ALL, followed by PACK.  The ZAP command can only be performed on a table that is open for exclusive use.  The ZAP command is typically used to reinitialize a 'transaction' table, or a journal file.  If SET SAFETY is ON, a message prompting for confirmation of the operation will be displayed before the ZAP can take place.  ZAP also resets the table SEQNO to zero.
+
The ZAP command permanently removes all of the records from the active table, without affecting the table structure.  ZAP is equivalent to DELETE ALL, followed by PACK.  The ZAP command can only be performed on a table that is open for exclusive use.  The ZAP command is typically used to reinitialize a 'transaction' table, or a journal file.  ZAP also resets the table SEQNO to zero.
 
+
Any index files that have been associated with the active table are also reinitialized.  Once a table has been 'zapped', there is no way of recovering the records that were previously contained in it.  You should always use this command with caution.  Permission to use the ZAP command on a table can be disabled.  The ADMIN field in the <SECURITY> option from the menu bar of the CREATE, MODIFY STRUCTURE table work surface is used for this purpose.
+
  
 +
Any index files that have been associated with the active table are also reinitialized.  Once a table has been 'zapped', there is no way of recovering the records that were previously contained in it.  You should always use this command with caution.
  
 
==Example==
 
==Example==
Line 24: Line 20:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Table Basics]]
+
[[Category:NoSQL Commands]]
[[Category:Table Basics Commands]]
+
[[Category:Data Commands]]
+

Latest revision as of 12:01, 14 June 2016

Purpose

Permanently remove all records from the active table

Syntax

ZAP

See Also

DELETE, DISPLAY PROTECTION, LIST PROTECTION, PACK, SEQNO(), SET EXCLUSIVE, SET SEQNO, SET SHARE, TRUNCATE TABLE

Description

The ZAP command permanently removes all of the records from the active table, without affecting the table structure. ZAP is equivalent to DELETE ALL, followed by PACK. The ZAP command can only be performed on a table that is open for exclusive use. The ZAP command is typically used to reinitialize a 'transaction' table, or a journal file. ZAP also resets the table SEQNO to zero.

Any index files that have been associated with the active table are also reinitialized. Once a table has been 'zapped', there is no way of recovering the records that were previously contained in it. You should always use this command with caution.

Example

set exclusive on
use newpatrons
zap