Difference between revisions of "DROP DATABASE"

From Lianjapedia
Jump to: navigation, search
m (Text replace - "Recital" to "Lianja")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Removes the specified database and all its tables
 
Removes the specified database and all its tables
 
  
 
==Syntax==
 
==Syntax==
 
DROP DATABASE [IF EXISTS] <database name>
 
DROP DATABASE [IF EXISTS] <database name>
 
  
 
==See Also==
 
==See Also==
[[ADATABASES()]], [[ADD TABLE]], [[ALTER INDEX]], [[ALTER TABLE]], [[BACKUP DATABASE]], [[CLOSE DATABASES]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DATABASE()]], [[DB_DATADIR]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY SCHEMAS]], [[DISPLAY TABLES]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST SCHEMAS]], [[LIST TABLES]], [[OPEN DATABASE]], [[PACK DATABASE]], [[REBUILD DATABASE]], [[REINDEX DATABASE]], [[RESTORE DATABASE]], [[SET AUTOCATALOG]], [[SET EXCLUSIVE]], [[SQL USE|USE]]
+
[[ADATABASES()]], [[ADD TABLE]], [[ALTER INDEX]], [[ALTER TABLE]], [[CLOSE DATABASES]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DATABASE()]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY SCHEMAS]], [[DISPLAY TABLES]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST SCHEMAS]], [[LIST TABLES]], [[OPEN DATABASE]], [[PACK DATABASE]], [[REBUILD DATABASE]], [[REINDEX DATABASE]], [[SET AUTOCATALOG]], [[SET EXCLUSIVE]], [[SQL USE|USE]]
 
+
  
 
==Description==
 
==Description==
 
The DROP DATABASE command removes the specified database and all its tables.  The number of files deleted from the database is returned.  An error occurs if the database does not exist unless the IF EXISTS clause is specified.
 
The DROP DATABASE command removes the specified database and all its tables.  The number of files deleted from the database is returned.  An error occurs if the database does not exist unless the IF EXISTS clause is specified.
 
Databases in Lianja 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 Lianja data directory.  The environment variable DB_DATADIR points to the current Lianja 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==
Line 22: Line 16:
 
</code>
 
</code>
  
 
==Products==
 
Lianja Server, Lianja
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Databases]]
 
[[Category:Databases]]
[[Category:Databases Commands]]
 

Latest revision as of 10:41, 21 December 2012

Purpose

Removes the specified database and all its tables

Syntax

DROP DATABASE [IF EXISTS] <database name>

See Also

ADATABASES(), ADD TABLE, ALTER INDEX, ALTER TABLE, CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, COPY DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, DATABASE(), DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY SCHEMAS, DISPLAY TABLES, DROP INDEX, DROP TABLE, GETENV(), LIST DATABASE, LIST INDEXES, LIST SCHEMAS, LIST TABLES, OPEN DATABASE, PACK DATABASE, REBUILD DATABASE, REINDEX DATABASE, SET AUTOCATALOG, SET EXCLUSIVE, USE

Description

The DROP DATABASE command removes the specified database and all its tables. The number of files deleted from the database is returned. An error occurs if the database does not exist unless the IF EXISTS clause is specified.

Example

DROP DATABASE temp