1. NAME:
ROLL.NO: 20
BATCH: B1
SUBJECT: DBMS
BRANCH: CSE
PRACTICAL NO :-2
AIM:- To study and execute DML commands .Execute queries
on Select, insert, update and delete statement.
THEORY:- What are DML commands?
2. ⮚ DML commands are the SQL commandssuch as select,
insert, update, delete in an ORACLE database.
⮚ The data definitionlanguages provide the following
commands.
1) Select commands
2) Insert commands
3) Update commands
4) Delete commands
1. Select table commands :
> SELECT command or statement in SQL is used to fetch
data records from the database table and present it in the form
of a result set.
Syntax :
SELECT * FROM table_name;
Example:
SELECT FULL_NAME, POSITION
FROM CEO
WHERE SALARY >1000;
2. Insert commands :
> The INSERT query command in SQL provides a way to
add new rows of informationor data inside a specific
database of the RDBMS.
Syntax:
INSERT INTO TABLE_NAME(column1, column2,
column3,…columnN)
VALUES (value1, value2, value3,…valueN);
3. 3. Update commands :
> This command is used to update or modify the value of a
column in the table.
Syntax :
UPDATE table_name SET [column_name1= value
1,...column_nameN = valueN] [WHERE CONDITION]
Example:
UPDATE CEO SET SALARY=3000 WHERE NO=1;
4. Delete commands :
>It is used to remove one or more row from a table.
Syntax:
DELETE FROM table_name [WHERE condition];
Example:
DELETE FROM CEO
WHERE SALARY<2000;
OUTPUT: