Geek University

SQL DROP statement

The SQL DROP statement permanently removes database objects such as tables, views, or indexes.

To drop a database, use the following syntax:

DROP DATABASE dbname;

To drop a table, use the following syntax:

DROP TABLE tablename;

You can also use the TRUNCATE TABLE statement to delete all rows from a table, but not the table itself:

TRUNCATE TABLE tablename;

Subscribe to our Newsletter

Like us on Facebook

Share on Twitter

top
Developed by Signum Soft