Content deleted Content added
No edit summary Tags: Reverted Mobile edit Mobile web edit |
Mindmatrix (talk | contribs) m Reverted edits by 49.185.161.75 (talk) to last version by WalkingRadiance |
||
(11 intermediate revisions by 7 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, indices, and users. DDL statements are similar to a computer [[programming language]] for defining [[data structure]]s, especially [[database schema]]s. Common examples of DDL statements include <code>CREATE</code>, <code>ALTER</code>, and <code>DROP</code>.
==History==
Line 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" /> Many implementations extend the syntax to allow creation of additional elements, such as [[Database index|indexes]] and user profiles. Some systems, such as [[PostgreSQL]] and [[Microsoft SQL Server|SQL Server]], allow ''CREATE'', and other DDL commands, inside a [[database transaction]] and thus they may be [[rollback (data management)|rolled back]].<ref>{{cite web |last1=Laudenschlager |first1=Douglas |last2=Milener |first2=Gene |last3=Guyer |first3=Craig |last4=Byham |first4=Rick |title=Transactions (Transact-SQL) |url=https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql?view=sql-server-2017 |website=Microsoft Docs |publisher=Microsoft |access-date=12 November 2018}}</ref><ref>{{cite web |title=PostgreSQL Transactions |url=https://www.postgresql.org/docs/8.3/tutorial-transactions.html |website=PostgreSQL 8.3 Documentation |date=7 February 2013 |publisher=PostgreSQL |access-date=12 November 2018}}</ref>
====CREATE TABLE statement====
Line 70:
For example, the command to drop a table named '''employees''' is:
<syntaxhighlight lang="
DROP TABLE employees;
</syntaxhighlight>
Line 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]]
|