faqts : Computers : Programming : Languages : Sql

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

Database: Language: SQL: Database: Operation: Remove: How to delete a database completely? [drop]

May 22nd, 2005 02:11
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 22 May 2005 - 04:29 pm ------------------------

Database: Language: SQL: Database: Operation: Remove: How to delete a 
database completely? [drop]

---

Use the SQL command:

(of course use this command with great care, as it will remove that
 database completely.
 So possibly make a backup of that database first)

---

 DROP DATABASE <your database name>

---

you can also use

 DROP DATABASE IF EXISTS <your database name>

---
---

General format:

-----------------------------------------------
DROP DATABASE
 <mydatabasename>
;
-----------------------------------------------

---
---

e.g.

-----------------------------------------------
DROP DATABASE IF EXISTS
 databaseStudy
;
-----------------------------------------------

---
---

Internet: see also:

---

Database: Language: SQL: Overview: Can you give an overview of links 
about SQL?
http://www.faqts.com/knowledge_base/view.phtml/aid/32811/fid/54

----------------------------------------------------------------------