0% found this document useful (0 votes)
2 views7 pages

CLASS XC_XE

The document outlines a practical project work on SQL queries for the AISSE Exam 2025 in Information Technology. It includes sections on acknowledgements, introduction to DDL and DML, various SQL queries for creating and manipulating an EMPLOYEE table, and concludes with the capabilities of SQL commands. Key SQL operations demonstrated include creating tables, inserting records, querying data, updating records, and deleting entries.

Uploaded by

tyrantiisumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

CLASS XC_XE

The document outlines a practical project work on SQL queries for the AISSE Exam 2025 in Information Technology. It includes sections on acknowledgements, introduction to DDL and DML, various SQL queries for creating and manipulating an EMPLOYEE table, and concludes with the capabilities of SQL commands. Key SQL operations demonstrated include creating tables, inserting records, querying data, updating records, and deleting entries.

Uploaded by

tyrantiisumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

AISSE EXAM 2025

PRACTICAL PROJECT WORK

INFORMATION TECHNOLOGY
(Subject Code: 402)

QUERIES

NAME :
AISSE ROLL NO :
TABLE OF CONTENTS

SLN TOPIC PAGE

1. ACKNOWLEDGEMENT 1

2. INTRODUCTION 2

3. SQL QUERIES 3

4. CONCLUSION 5
ACKNOWLEDGEMENT
I would like to extend my special thanks of gratitude to our Vice Principal Mrs Deepa
Rai Rakali Ma’am for providing me this golden opportunity to work on this project on
Queries and our Subject Teacher Mr P K Das Sir for helping me to complete this project
under his guidance.

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.

DATA MANIPULATION LANGUAGE (DML)


A data manipulation language (DML) is a language that enables users to access and
manipulate data in a database. The goal is to provide efficient human interaction with
the system.
Data manipulation involves the following points:
 Retrieval of information from the database - SELECT statement
 Insertion of new information into the database - INSERT statement
 Deletion of information in the database - DELETE statement
 Modification of information in the database - UPDATE statement

A query language is a part of DML involving information retrieval only. The terms DML
and query language are often used synonymously.

A popular data manipulation language is Structured Query Language (SQL). This is


used to retrieve and manipulate data in a relational database. Data manipulation
language comprises the SQL data change statements, which modify stored data but not
the schema or database objects.

DML can be classified into the following two categories:


i) Procedural: Here the user specifies what data is needed and how to get it
ii) Nonprocedural: Here the user only specifies what data is needed.

-2-
SQL QUERIES
1. Create a table EMPLOYEE with the following structure:

FieldName Datatype Size/Constraint


EMPNO INTEGER PRIMARY KEY
EMPNAME VARCHAR 25
DESIG VARCHAR 10
BASICPAY INTEGER
JOINDATE DATE

CREATE TABLE EMPLOYEE


(EMPNO INTEGER PRIMARY KEY,
EMPNAME VARCHAR(25),
DESIG VARCHAR(10),
BASICPAY INTEGER,
JOINDATE DATE);

2. Insert the following 5 records in the table EMPLOYEE


1001, RAMESH SHARMA, PGT, 30000, 2020-06-21
1002, SANTOSH AGARWAL, TGT, 25000, 2020-06-21
1003, ANIMESH MUKHERJEE, PGT, 30000, 2020-06-23
1004, SANTOSH SINHA, PRT, 20000, 2020-07-02
1005, JAYANTA RAY, TGT, 25000, 2020-07-03

INSERT INTO EMPLOYEE VALUES (1001, ‘RAMESH SHARMA’, ‘PGT’, 30000, ‘2020-06-21’);
INSERT INTO EMPLOYEE VALUES (1002, ‘SANTOSH AGARWAL’, ‘TGT’, 25000, ‘2020-06-21’);
INSERT INTO EMPLOYEE VALUES (1003, ‘ANIMESH MUKHERJEE’, ‘PGT’, 30000, ‘2020-06-23’);
INSERT INTO EMPLOYEE VALUES (1004, ‘SANTOSH SINHA, ‘PRT’, 20000, ‘2020-07-02’);
INSERT INTO EMPLOYEE VALUES (1005, ‘JAYANTA RAY’, ‘TGT’, 25000, ‘2020-07-03’);

3. Display all records from table EMPLOYEE

SELECT * FROM EMPLOYEE;

Output:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1001 RAMESH SHARMA PGT 30000 2020-06-21
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1003 ANIMESH MUKHERJEE PGT 30000 2020-06-23
1004 SANTOSH SINHA PRT 20000 2020-07-02
1005 JAYANTA RAY PGT 25000 2020-07-03

4. Display the records from table EMPLOYEE whose DESIG is either ‘PGT or ‘TGT’

SELECT * FROM EMPLOYEE WHERE DESIG IN (‘PGT, ‘TGT’);

Output:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1001 RAMESH SHARMA PGT 30000 2020-06-21
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1003 ANIMESH MUKHERJEE PGT 30000 2020-06-23
1005 JAYANTA RAY TGT 25000 2020-07-03

-3-
5. Display the records from table EMPLOYEE whose EMPNAME starts with ‘SANTOSH’

SELECT * FROM EMPLOYEE WHERE EMPNAME LIKE ‘SANTOSH%’;


Output:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1004 SANTOSH SINHA PRT 20000 2020-07-02

6. Display all records from table EMPLOYEE after sorting on EMPNAME

SELECT * FROM EMPLOYEE ORDER BY EMPNAME;


Output:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1003 ANIMESH MUKHERJEE PGT 30000 2020-06-23
1005 JAYANTA RAY TGT 25000 2020-07-03
1001 RAMESH SHARMA PGT 30000 2020-06-21
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1004 SANTOSH SINHA PRT 20000 2020-07-02

7. Change the value of EMPNAME ‘JAYANTA RAY’ to ‘JAYANTA KR ROY’ in table


EMPLOYEE

UPDATE EMPLOYEE
SET EMPNAME = ‘JAYANTA KR ROY’
WHERE EMPNAME = ‘JAYANTA RAY’;
Result inside Table:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1001 RAMESH SHARMA PGT 30000 2020-06-21
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1003 ANIMESH MUKHERJEE PGT 30000 2020-06-23
1004 SANTOSH SINHA PRT 20000 2020-07-02
1005 JAYANTA KR RAY PGT 25000 2020-07-03

8. Increase the BASICPAY of employees with DESIG ‘PGT’ by 10000 in table EMPLOYEE
UPDATE EMPLOYEE
SET BASICPAY = BASICPAY + 10000
WHERE DESIG = ‘PGT’;
Result inside Table:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1001 RAMESH SHARMA PGT 40000 2020-06-21
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1003 ANIMESH MUKHERJEE PGT 40000 2020-06-23
1004 SANTOSH SINHA PRT 20000 2020-07-02
1005 JAYANTA RAY PGT 25000 2020-07-03
9. Remove the record whose EMPNO is 1001 from table EMPLOYEE
DELETE FROM EMPLOYEE WHERE EMPNO = 1003;
Result inside Table:
EMPNO EMPNAME DESIG BASICPAY JOINDATE
1001 RAMESH SHARMA PGT 30000 2020-06-21
1002 SANTOSH AGARWAL TGT 25000 2020-06-21
1004 SANTOSH SINHA PRT 20000 2020-07-02
1005 JAYANTA RAY PGT 25000 2020-07-03

-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-

You might also like