Data Manipulation Language (DML) Statements
Data manipulation language (DML) statements query or manipulate data in existing schema objects.
Whereas DDL statements change the structure of the database, DML statements query or change the contents. For example, ALTER TABLE changes the structure of a table, whereas INSERT adds one or more rows to the table.
dell emc certification malaysia
DML statements are the most frequently used SQL statements and enable you to:
Retrieve or fetch data from one or more tables or views (
SELECT).Add new rows of data into a table or view (
INSERT) by specifying a list of column values or using a subquery to select and manipulate existing data.Change column values in existing rows of a table or view (
UPDATE).Update or insert rows conditionally into a table or view (
MERGE).Remove rows from tables or views (
DELETE).View the execution plan for a SQL statement (
EXPLAINPLAN).Lock a table or view, temporarily limiting access by other users (
LOCKTABLE).
The following example uses DML to query the employees table. The example uses DML to insert a row into employees, update this row, and then delete it:
SELECT * FROM employees; INSERT INTO employees (employee_id, last_name, email, job_id, hire_date, salary) VALUES (1234, 'Mascis', 'JMASCIS', 'IT_PROG', '14-FEB-2008', 9000); UPDATE employees SET salary=9100 WHERE employee_id=1234; DELETE FROM employees WHERE employee_id=1234;
A collection of DML statements that forms a logical unit of work is called a transaction. For example, a transaction to transfer money could involve three discrete operations: decreasing the savings account balance, increasing the checking account balance, and recording the transfer in an account history table. Unlike DDL statements, DML statements do not implicitly commit the current transaction.
citrix certification malaysia 2
Comments
Post a Comment