DML also known as Data Manipulation Language.It is used to retrieve, store, modify, delete, insert and update data in database.Various statements or commands included under this category are:
1)INSERT
2)SELECT
3)UPDATE
4)DELETE
INSERT:
1)INSERT
2)SELECT
3)UPDATE
4)DELETE
INSERT:
This statement is used to insert data into a table. Syntax:
INSERT INTO <table name>(<column name1>,.....)
VALUES('a','b','c');
*(column name1,....) is an optional part.
*If you are writing a column names make sure count of no. of values=count of no. of columns and should be in the same order as the column names.
SELECT:
This statement is used to retrieve data from a database based on various condition using WHERE conditions.
SELECT <column name1>,<column_name2>,....
FROM <table name>
WHERE <condition>.
UPDATE:
This statement is used to update values in a table. Syntax:
UPDATE <table name>
SET <column name1>=<value>
WHERE <condition>;
DELETE:
This is used to delete certain rows from a table based on certain conditions.
DELETE FROM <table name> WHERE <condition>;
IMPORTANT PIONTS:
1) Always apply semi-colon(;) at the end of the query.
Sunday
// //
0
comments
//
0 comments to "DATA MANIPULATION LANGUAGE"
Powered by Blogger.
Post a Comment