0% found this document useful (0 votes)
15 views9 pages

Ip File

The document outlines a program file for Class XII 'A' Informatics Practices at Police Modern School, detailing various SQL queries to manage employee data. It includes tasks such as creating tables, inserting values, and querying employee information based on specific criteria. Each program is designed to demonstrate different SQL functionalities, such as constraints, joins, and aggregations.

Uploaded by

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

Ip File

The document outlines a program file for Class XII 'A' Informatics Practices at Police Modern School, detailing various SQL queries to manage employee data. It includes tasks such as creating tables, inserting values, and querying employee information based on specific criteria. Each program is designed to demonstrate different SQL functionalities, such as constraints, joins, and aggregations.

Uploaded by

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

POLICE MODERN SCHOOL

41 B.N P.A.C VAISHALI


GHAIZABAD

SESSION 2024 – 2025


CLASS – XII ‘A’
INFORMATICS PRACTICES
PROGRAM FILE

Name – Aryan Pandey


Roll No – 9
Teacher’s Name – Ms. Nisha Verma
Program 1. Write a SQL query to create given table Emp while
crea ng add constraints i.e Primary key on Serial no, Not null on
first name and Hire date, Default constraints on Salary and check
constraints on DOB and Salary. S.No First Name Last Name Salary
Zone Age Grade DOB Hiredate dept no.
Output:

Program 2. Write a SQL Query to insert values in the above table.


Output:

Program 3. Write a SQL Query to show the details of employees


whose salary is more than 50000.
Output:
Program 4. Write a SQL query to show the name and zone of
employees whose grade is B.
Output:

Program 5. Write a SQL query to show the serial number, name and
salary of employees which belongs to a list (East, West, North,
South).
Output:

Program 6. Write a SQL query to show data according to age in


descending order.
Output:
Program 7. Write a SQL query to show details of the employees in
increasing order of their salary.
Output:

Program 8. Write a SQL query to display the details of the youngest


employee.
Output:

Program 9. Write a SQL query to display salaries of employees by


round off to two decimal place.
Output:
Program 10. Write a SQL query to display the Day name from hiring
dates of employees.
Output:

Program 11. Write a SQL query to join First_name and Last_name of


Employee as Emp_name and print their name length.
Output:

Program 12. Write a SQL query to show the first 3 leƩers of the first
name of employees.
Output:

Program 13. Write a SQL query to show the employee first and last
name in upper and lower case.
Output:

Program 14. Write a SQL query to display the total salary of


employees.
Output:

Program 15. Write a SQL query to display the average age of


employees.
Output:
Program 16. Write a SQL query to show the minimum and
maximum salary of employees.
Output:

Program 17. Write a SQL query to show the total number of


employees who belongs to department no. 101.
Output:

Program 18. Write a SQL query to display total no. of employee in


each department.
Output:
Program 19. Write a SQL query to print the total salary of employee
department wise.
Output:

Program 20. Create another table Order based on the given field
descrip on with appropriate constraint.
Order No, Order_Name, Dept_No, Order_date , Qty.
Output:

Program 21. Insert data of 4-5 rows in the above Order table.
Output:
Program 22. Write a SQL query to Join the two tables Emp and
Order.
Output:

Program 23. Write a SQL query to perform the join on two tables,
Emp and Orders such that only the common records from the
iden cal column will appear in the output.
Output:

Program 24. Write a SQL query to perform the Natural Join on the
tables Emp and Orders.
Output:

You might also like