Content deleted Content added
No edit summary |
Mindmatrix (talk | contribs) m Reverted edits by 49.185.161.75 (talk) to last version by WalkingRadiance |
||
(25 intermediate revisions by 19 users not shown) | |||
Line 6:
{{Cleanup|reason=the article focuses almost entirely on SQL.|date=June 2020}}
}}
[[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,
==History==
The concept of the data definition language and its name was first introduced in relation to the [[Codasyl]] database model, where the schema of the [[database]] was written in a [[Syntax (programming languages)|language syntax]] describing the [[Record (computer science)|records]], [[Field (computer science)|fields]], and [[Set (abstract data type)|sets]] of the user [[data model]].<ref>{{cite book|last=Olle|first=T. William|title=The Codasyl Approach to Data Base Management|year=1978|publisher=Wiley|isbn=0-471-99579-7|url-access=registration|url=https://archive.org/details/codasylapproacht00olle}}</ref> Later it was used to refer to a subset of [[Structured Query Language]] (SQL) for declaring [[Table (database)|tables]], columns, data types and [[Integrity constraints|constraints]]. [[SQL-92]] introduced a schema manipulation language and schema information tables to query schemas.<ref name="SQL92">{{cite web |title=Information Technology - Database Language SQL |url=http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt |website=SQL92 |publisher=Carnegie Mellon |
==Structured Query Language (SQL)==
Line 17 ⟶ 18:
The ''create'' command is used to establish a new database, table, index, or [[stored procedure]].
The ''CREATE'' statement in [[SQL]] creates a component in a [[relational database management system]] (RDBMS). In the SQL 1992 specification, the types of components that can be created are schemas, [[table (database)|tables]], [[View (database)|views]], domains, [[character set]]s, [[collation]]s, translations, and assertions.<ref name="SQL92" />
====CREATE TABLE statement====
Line 37 ⟶ 38:
first_name VARCHAR(50) not null,
last_name VARCHAR(75) not null,
dateofbirth DATE not null
);
Line 49 ⟶ 50:
| title = The Definitive Guide to SQLite
| url = https://books.google.com/books?id=WLinoJaOUCwC
|
| edition = 2
| series = Apresspod
Line 69 ⟶ 70:
For example, the command to drop a table named '''employees''' is:
<syntaxhighlight lang="
DROP TABLE employees;
</syntaxhighlight>
Line 101 ⟶ 102:
==Other languages==
* [[XML Schema (W3C)|XML Schema]] is an example of a DDL for [[XML]].
* [[JSON#
* [[Data_Format_Description_Language|DFDL schema]] is an example of a DDL that can describe many text and binary formats.
==See also==
Line 117 ⟶ 119:
==External links==
* [https://oracletutorial.net/alter-table-modify-column-oracle.html Oracle ALTER TABLE MODIFY column] {{Webarchive|url=https://web.archive.org/web/20210421200756/https://oracletutorial.net/alter-table-modify-column-oracle.html |date=2021-04-21 }}
* [https://oracletutorial.net/dml-ddl-commands-in-oracle.html#ddl-commands-in-oracle DDL Commands In Oracle] {{Webarchive|url=https://web.archive.org/web/20210421203338/https://oracletutorial.net/dml-ddl-commands-in-oracle.html#ddl-commands-in-oracle |date=2021-04-21 }}
{{Database}}
[[Category:Articles with example SQL code]]
|