Previous Page
Next Page

3.7. Deleting a Table

The general syntax to delete or remove an entire table and its contents is:

DROP TABLE Tablename

For example, to delete the table called Names from your database, you would type the following:

DROP TABLE Names

There are times when it is appropriate to delete all the data in a table and there are times when the entire table should be eradicated. When a table is dropped, it no longer exists; its definition is removed from the database. But, when data is deleted from a table with a DELETE statement (maybe with a WHERE condition), the table may be repopulated, because only the data from the table was removed, but the definition is intact.


Previous Page
Next Page