What are the commands that come in the category of DML in SQL?

DML refers to Data Manipulation Statements. That is used for accessing and modifying values or data present in the database.


The commands that come in the category of DML in SQL



  • INSERT

  • SELECT

  • DELETE

  • UPDATE


INSERT:

This command is used to insert rows into the table.



SYNTAX:

INSERT INTO tablename VALUES (value,value,….);



SELECT:

This is used to select values or data from table



SYNTAX:

SELECT column name1, column name2, …. FROM tablename;



If we want to select all column values from a table then SQL command use is

SELECT * from tablename ;



DELETE:

In order to delete rows from a table we use this command



SYNTAX:

DELETE FROM tablename WHERE condition;



Based on the condition specified the rows gets fetched from the table and gets deleted in table. Here the WHERE clause is optional.



UPDATE:

This SQL command is used to modify the values in an existing table.



SYNTAX:

UPDATE tablename SET columnname = value, columnname = value,….. WHERE condition;



The rows which satisfies the WHERE condition are fetched and for these rows the column values we placed in command above in SET statement gets updated.

Questions by GeekAdmin   answers by GeekAdmin

Showing Answers 1 - 12 of 12 Answers

The DML  is for Data Manipulation Langugae i.e. those commands comes into picture that modifies datavalues in the database.
The DML commands are INSERT,UPDATE,DELETE,MERGE.

Some body answers that SELECT is a DML command, but dear SELECT is only for retriving data not for manipulation of data that's why SELECT is a Data Query Language.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions