Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Data definition language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===DROP statement=== The ''DROP'' statement destroys an existing database, table, index, or view. A ''DROP'' statement in [[SQL]] removes a component from a [[relational database management system]] (RDBMS). The types of objects that can be dropped depends on which RDBMS is being used, but most support the dropping of [[table (database)|tables]], [[user (database)|users]], and [[database]]s. Some systems (such as [[PostgreSQL]]) allow DROP and other DDL commands to occur inside of a [[database transaction|transaction]] and thus be [[rollback (data management)|rolled back]]. The typical usage is simply: DROP ''objecttype'' ''objectname''. For example, the command to drop a table named '''employees''' is: <syntaxhighlight lang="sql"> DROP TABLE employees; </syntaxhighlight> The ''DROP'' statement is distinct from the ''[[Delete (SQL)|DELETE]]'' and ''[[Truncate (SQL)|TRUNCATE]]'' statements, in that ''DELETE'' and ''TRUNCATE'' do not remove the table itself. For example, a ''DELETE'' statement might delete some (or all) data from a table while leaving the table itself in the database, whereas a ''DROP'' statement removes the entire table from the database.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)