Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.44 KB

Console-Command-Drop-Database.md

File metadata and controls

40 lines (25 loc) · 1.44 KB
search
keywords
console
command
drop
delete
database
DROP DATABASE

Console - DROP DATABASE

Removes a database completely. If the database is open and a database name not given, it removes the current database.

Syntax

DROP DATABASE [<database-name> <server-username> <server-user-password>]
  • <database-name Defines the database you want to drop. By default it uses the current database, if it's open.
  • <server-username> Defines the server user. This user must have the privileges to drop the database.
  • <server-user-password> Defines the password for the server user.

NOTE: When you drop a database, it deletes the database and all records, caches and schema information it contains. Unless you have made backups, there is no way to restore the database after you drop it.

Examples

  • Remove the current local database:

    orientdb> DROP DATABASE
    
  • Remove the database demo at localhost:

    orientdb> DROP DATABASE remote:localhost/demo root root_password
    

You can create a new database using the CREATE DATABASE command. To make changes to an existing database, use the ALTER DATABASE command.

For more information on other commands, see SQL and Console commands.