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 manipulation 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!
==SQL== In SQL, the data manipulation language comprises the ''SQL-data change'' statements,<ref name="SQL92, statements by function" /> which modify stored data but not the [[database schema|schema]] or database objects. Manipulation of persistent database objects, e.g., tables or [[stored procedure]]s, via the SQL schema statements,<ref name="SQL92, statements by function" >[[#SQL92|SQL92]] 4.22.2, SQL statements classified by function</ref> rather than the data stored within them, is considered to be part of a separate [[data definition language]] (DDL). In SQL these two categories are similar in their detailed syntax, data types, expressions etc., but distinct in their overall function.<ref name="SQL92, statements by function" /> The ''SQL-data change'' statements are a subset of the ''SQL-data'' statements; this also contains the [[Select (SQL)|SELECT]] query statement,<ref name="SQL92, statements by function" /> which strictly speaking is part of the DQL, not the DML. In common practice though, this distinction is not made and ''SELECT'' is widely considered to be part of DML,<ref name="Oracle, DML">{{cite web |title=Data Manipulation Language Statements |url=http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm#i18503 |publisher=[[Oracle Database|Oracle]] |quote=Data manipulation language (DML) statements ''query or manipulate'' data in existing schema objects. }}</ref> so the DML consists of all ''SQL-data'' statements, not only the ''SQL-data change'' statements. The <code>[[Select (SQL)|SELECT ... INTO ...]]</code> form combines both selection and manipulation, and thus is strictly considered to be DML because it manipulates (i.e. modifies) data. Data manipulation languages have their functional capability organized by the initial word in a statement, which is almost always a [[verb]]. In the case of SQL, these verbs are: * <code>[[Select (SQL)|SELECT ... FROM ... WHERE ...]]</code> (strictly speaking DQL) ** <code>[[Select (SQL)|SELECT ... INTO ...]]</code> * <code>[[Insert (SQL)|INSERT INTO ... VALUES ...]]</code> * <code>[[Update (SQL)|UPDATE ... SET ... WHERE ...]]</code> * <code>[[Delete (SQL)|DELETE FROM ... WHERE ...]]</code> For example, the command to insert a row into table '''employees''': <syntaxhighlight lang="sql"> INSERT INTO employees (first_name, last_name, fname) VALUES ('John', 'Capita', 'xcapit00'); </syntaxhighlight>
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)