DML is the subset of SQL used to add, update and delete data:
INSERT adds rows (formally tuples) to an existing table, e.g.,:
INSERT INTO My_table
(field1, field2, field3)
VALUES
(‘test’, ‘N’, NULL);
UPDATE modifies a set of existing table rows, e.g.,:
UPDATE My_table
SET field1 = ‘updated value’
WHERE field2 = ‘N’;
DELETE removes existing rows from a table, e.g.,:
DELETE FROM My_table
WHERE field2 = ‘N’;
MERGE is used to combine the data of multiple tables. It combines the INSERT and UPDATE elements. It is defined in the SQL:2003 standard; prior to that, some databases provided similar functionality via different syntax, sometimes called “upsert”.
« SQL Queries PMML »