Data definition language: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
m Reverted edits by 49.185.161.75 (talk) to last version by WalkingRadiance
 
(One intermediate revision by one other user not shown)
Line 7:
}}
[[File:UY3OsG1vuT-saving-a-ddl-file-in-Oracle-Developer.png|alt=Saving a ddl file in Oracle SQL Developer|thumb|Saving a ddl file in Oracle SQL Developer]]
In the context of [[SQL]], '''data definition''' or '''data description language''' ('''DDL''') is a syntax for creating and modifying database objects such as tables, indices, and users. DDL statements are similar to a computer [[programming language]] for defining [[data structuresstructure]]s, especially [[database schemasschema]]s. Common examples of DDL statements include <code>CREATE</code>, <code>ALTER</code>, and <code>DROP</code>. If you see a .ddl file, that means the file contains a statement to create a table. Oracle SQL Developer contains the ability to export from an ERD generated with Data Modeler to either a .sql file or a .ddl file.
 
==History==
Line 64:
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 databases[[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''.