Difference between revisions of "CLOSE TABLES"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
 
==Purpose==
 
==Purpose==
 
Closes the currently open tables and their associated files in the active database
 
Closes the currently open tables and their associated files in the active database
Line 9: Line 8:
  
 
==See Also==
 
==See Also==
[[ADATABASES()]], [[ALTER INDEX]], [[ALTER TABLE]], [[BACKUP DATABASE]], [[CLOSE DATABASES]], [[COMPILE DATABASE]], [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DB_DATADIR]], [[DBUSED()]],[[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY SCHEMAS]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]],  [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST SCHEMAS]], [[LIST TABLES]], [[OPEN DATABASE]], [[RESTORE DATABASE]], [[SET AUTOCATALOG]], [[SET EXCLUSIVE]], [[USE]]
+
[[ADATABASES()]], [[ALTER INDEX]], [[ALTER TABLE]], [[BACKUP DATABASE]], [[CLOSE DATABASES]], [[COMPILE DATABASE]], [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DB_DATADIR]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY SCHEMAS]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]],  [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST SCHEMAS]], [[LIST TABLES]], [[OPEN DATABASE]], [[RESTORE DATABASE]], [[SET AUTOCATALOG]], [[SET EXCLUSIVE]], [[USE]]
  
  
Line 17: Line 16:
 
If the ALL keyword is included, all tables and their associated files will be closed.
 
If the ALL keyword is included, all tables and their associated files will be closed.
  
Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database.  Operating System file protection can be applied individually to the files for added security.  The directories are sub-directories of the Recital data directory.  The environment variable / symbol DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function.  Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality.
+
Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database.  Operating System file protection can be applied individually to the files for added security.  The directories are sub-directories of the Recital data directory.  The environment variable DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function.  Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality.
  
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
Recital/SQL> set sql to vfp
+
OPEN DATABASE hr EXCLUSIVE
VFP/SQL> OPEN DATABASE hr EXCLUSIVE
+
use staff
VFP/SQL> use staff
+
CLOSE TABLES
VFP/SQL> CLOSE TABLES
+
 
</code>
 
</code>
  
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]

Latest revision as of 17:25, 22 December 2009

Purpose

Closes the currently open tables and their associated files in the active database


Syntax

CLOSE TABLES [ALL]


See Also

ADATABASES(), ALTER INDEX, ALTER TABLE, BACKUP DATABASE, CLOSE DATABASES, COMPILE DATABASE, COPY DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, DB_DATADIR, DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY SCHEMAS, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, GETENV(), LIST DATABASE, LIST INDEXES, LIST SCHEMAS, LIST TABLES, OPEN DATABASE, RESTORE DATABASE, SET AUTOCATALOG, SET EXCLUSIVE, USE


Description

The CLOSE TABLES command closes the currently open tables and their associated files in the active database. The database itself remains open. If no database is currently open, all tables and their associated files are closed.

If the ALL keyword is included, all tables and their associated files will be closed.

Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database. Operating System file protection can be applied individually to the files for added security. The directories are sub-directories of the Recital data directory. The environment variable DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function. Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality.


Example

OPEN DATABASE hr EXCLUSIVE
use staff
CLOSE TABLES


Products

Recital Server, Recital