Class XD
Class XD
INFORMATION
TECHNOLOGY
(Subject Code: 402)
QUERIES
NAME :
AISSE ROLL NO :
TABLE OF CONTENTS
1. ACKNOWLEDGEMENT 1
2. INTRODUCTION 2
3. SQL QUERIES 3
4. CONCLUSION 5
ACKNOWLEDGEMENT
NAME:
-1-
INTRODUCTION
In a database we can define the structure of the data and manipulate the
data using some commands. There are two types of languages for this task.
They are:
1. DDL (Data Definition Language)
2. DML (Data Manipulation Language)
DATA DEFINITION LANGUAGE (DDL)
A Data Definition Language or Data Description Language (DDL) is a
standard for commands that define the different structures in a database.
DDL statements are used to create, modify, and remove database objects
such as tables, indexes, and users. Some common DDL statements are
CREATE, ALTER, and DROP.
-2-
SQL QUERIES
1. Create a table STUDENT with the following structure:
INSERT INTO STUDENT VALUES (1001, ‘POOJA YADAV’, ‘MCA’, 30000, ‘2020-06-21’);
INSERT INTO STUDENT VALUES (1002, ‘SANTOSH SHARMA, ‘BCA’, 25000, ‘2020-06-21’);
INSERT INTO STUDENT VALUES (1003, ‘ANAND AGARWAL’, ‘MCA’, 30000, ‘2020-06-23’);
INSERT INTO STUDENT VALUES (1004, ‘SANTOSH SINGH’, ‘PGDCA’, 20000, ‘2020-07-02’);
INSERT INTO STUDENT VALUES (1005, ‘JAYANT RAJ’, ‘BCA’, 25000, ‘2020-07-03’);
-3-
5. Display the records from table STUDENT whose STUDNAME starts with
‘SANTOSH’
Output:
ADMNO STUDNAME COURSE FEES ADMDATE
1002 SANTOSH SHARMA BCA 25000 2020-06-21
1004 SANTOSH SINGH PGDCA 20000 2020-07-02
-4-
CONCLUSION
The scope of the SQL commands provide the capability to create a wide
variety of database objects like TABLES, VIEWS etc using the various DDL
commands such as CREATE, ALTER, and DROP commands.
These database objects can then be inserted with data using the DML
command INSERT. The data can be manipulated using a wide variety of
other DML commands such as SELECT, DELETE, and UPDATE.
-5-