You are on page 1of 13

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : Y. Vijaya Bhaskara Reddy
Designation : Senior Lecturer.
Branch : commercial and Computer
Practice.
Institute : G.P.W Kakinada.
Year/semester : VI semester.
Subject : Visual basics—II.
Subject code : CCP603.
Topic : Database Programming
Duration : 50 minutes.
Sub Topic : Structured Query Language.
Teaching Aids : PPTS.
OBJECTIVES

On completion of this period, you would be


able to:
 Know the format of SQL statements.
Structure Of The Period:
 Data Manipulation Language

 Statements in DML.
Recap:

 CREATE
 ALTER
 RENAME
 DROP
 TRUNCATE
Data Manipulation Language
(DML):
Using the Data manipulation language
(DML),you can run queries, add, delete,
and edit records, and otherwise manipulate
the content of your database.
DML statements include:

 select, insert, update, delete.


Select statement:
Select statement is used to display the records in a table.

 Syntax:
 Select column_names from table_name;
 To the above statement the following clauses can be
added:
 ‘Where’ clause to filter records
 ‘Group by’ clause to group records
 ‘Having’ clause to further filter grouped
records
 ‘order by’ clause is to produced sorted records
Insert:
Insert statement is used to insert records in a table.

Syntax:

 insert into table_name values (value1, value2, ……);


Update:

Update statement is used to modify the records in


a table.

Syntax:

Update table_name set column1 = value1


where condition;
Delete:
Delete statement is used to delete one or more
rows from the table.

 Syntax:

Delete from table_name where condition;

NOTE : Delete statement without a where condition


removes all the records in a table.
Quiz

1. What is the statement to display the records in a


table ?
Ans: SELECT.
2.What is the statement to add new records in a
table ?
Ans: INSERT
3.What is the statement to delete records of a table ?
Ans: DELETE
Frequently Asked Questions
1. List out the statements in DML ?
Summary:

 Data Manipulation Language statements

 SELECT
 INSERT
 UPDATE
 DELETE
Assignment
1. Briefly explain the following:
SELECT, INSERT, UPDATE

You might also like