Deleting Databases and Dropping Tables and Views
August 16, 1998
It is also simple to delete tables and
databases using GUI tools or SQL. In the case of a GUI, you
will simply select a table or database from your main menu
and delete it as you would a file in a file system manager.
In SQL, you would simply use the DELETE or DROP commands
depending on if you were deleting a whole database or just a table in a
single database.
In the case of deleting a whole database, you
will use the DELETE command as follows:
DELETE DATABASE DATABASE_NAME;
The following example would delete the
database MY_COMPANY:
DELETE DATABASE MY_COMPANY;
In the case of a table, you use the DROP
command:
DROP TABLE TABLE_NAME;
such as:
DROP TABLE EMPLOYEES;
Essentially when you use delete and drop, you
are modifying the database management system's data dictionary.
It shouldn't have to be said, but I will say it...BE CAREFUL WHEN DELETING
OR DROPPING!
Creating Tables
Introduction to Databases for the Web | Table of Contents
Altering a Table
|