IT 802 Practical File 2025-26 Java + SQL-2
IT 802 Practical File 2025-26 Java + SQL-2
SCHOOLSR. SEC.
XII Class-IT(802)
PRACTICAL FILE
2025-26
SUBMITTED BY:
Write your name
Class - Section
Submitted To:
I am also greatly indebted to our Principal Dr. Vandana Tandon and school
authorities for providing me with the facilities and requisite laboratory conditions for
making this practical file.
I also extend my thanks to Gourav Sir, Lab Engineer, my classmates and friends who
helped me to complete this practical file successfully.
[Name of Student]
CERTIFICATE
Swapan Kapuria
I.
II.
GRADE CALCULATOR
SQL
Q1. Create a database say School in mysql?
3. Create a table Dept having fields Deptno as int type, Dname as varchar type and Loc Varchar
type. Consider Deptno as primary key.
9. Display Eno, Ename from employee table only for Gents Employee
10. Display those ename whose salary between 40000 to 60000 both inclusive.
22. Display Eno, Ename, Salary, Deptno, dname for those employee who gets salary more than
50000.
Ans:
Ans:
Database changed
mysql>
3. Create a table Dept having fields Deptno as int type, Dname as varchar type and Loc
Varchar type. Consider Deptno as primary key.
Ans:
mysql> create table dept(
-> deptno int primary key,
-> dname varchar(15),
-> Loc varchar(10)
-> );
Query OK, 0 rows affected (0.09 sec)
Gender Char 1
Doj Date
Ans:
-> );
Ans:
+-----+--------+------------+----------+--------+
+-----+--------+------------+----------+--------+
+-----+--------+------------+----------+--------+
9. Display Eno, Ename from employee table only for Gents Employee
| eno | ename |
+-----+--------+
| 1 | Badal |
| 3 | Aditya |
+-----+--------+
10. Display those ename whose salary between 40000 to 60000 both inclusive.
mysql> select ename from employee where salary between 40000 and 60000;
+----------+
| ename |
+----------+
| Badal |
| Hanshika |
+----------+
+-----+--------+------------+----------+--------+--------+
+-----+--------+------------+----------+--------+--------+
+-----+--------+------------+----------+--------+--------+
+-----+--------+------------+--------+--------+-------+
+-----+--------+------------+--------+--------+-------+
+-----+--------+------------+----------+--------+----------+
+-----+--------+------------+----------+--------+----------+
+-----+--------+------------+----------+--------+----------+
+-----+--------+------------+----------+--------+----------+
+-----+--------+------------+----------+--------+----------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+----------+--------+
| count(*) | gender |
+----------+--------+
| 3|M |
| 1|F |
+----------+--------+
+-----+--------+------------+--------+--------+--------+
+-----+--------+------------+--------+--------+--------+
+-----+--------+------------+--------+--------+--------+
mysql> alter table employee add foreign key (deptno) references dept(deptno);
+--------+----------+-------+
+--------+----------+-------+
| 10 | Sales | Delhi |
| 20 | HR | Pune |
| 30 | PURCHASE | AGRA |
+--------+----------+-------+
mysql> select eno, ename, salary , dept.deptno, dname from employee, dept where
employee.deptno=dept.deptno;
22. Display Eno, Ename, Salary, Deptno, dname for those employee who gets salary more than
50000.
23. Display those employees who joined after 01.01.2011