0% found this document useful (0 votes)
16 views

Lab Assignment 2

The document outlines a lab assignment focused on SQL queries related to an Employee (Emp) table with specified columns. It includes tasks such as inserting records, retrieving employee details based on various conditions, and performing calculations on salaries. The assignment requires the use of SQL commands to answer specific questions about employee data.

Uploaded by

jaggarwal1be22
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)
16 views

Lab Assignment 2

The document outlines a lab assignment focused on SQL queries related to an Employee (Emp) table with specified columns. It includes tasks such as inserting records, retrieving employee details based on various conditions, and performing calculations on salaries. The assignment requires the use of SQL commands to answer specific questions about employee data.

Uploaded by

jaggarwal1be22
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/ 2

Lab Assignment–2

Based on Emp table


Columns are EmpNo, Ename, Job, Salary, Commission, DeptNO
Insert 5 records by stroring Null value in some records for commission column.

Q1) Get employee no and employee name who works in dept no


10 ?

Q2) Display the employee names of those clerks whose salary


> 2000 ?

Q3) Display name and job of Salesperson & Clerks ?

Q4) Display all details of employees whose salary between


2000 and 3000 ?

Q5) Display all details of employees whose dept no is 10,


20, or 30 ?

Q6) Display name of those employees whose commission is


NULL ?

Q7) Display dept no & salary in ascending order of dept no


and with in each dept no salary should be in descending
order ?

Q8) Display name of employees having two ‘a’ or ‘A’ chars


in the name ?

Q9) Display the name of the employees whose second char is


‘b’ or ‘B’ ?

Q10) Display the name of the employees whose first or last


char is ‘a’ or ‘A’ ?

Q11) Display maximum, minimum, average salary of deptno 10


employees.

Q12) Display total number of employees working in deptno 20

Q13) Display total salary paid to clerks

Q14) Display system date

Q15) Display the result of (12*12)/13


Q16) Display info of ‘raj’ irrespective to the case in
which the data is stored.

You might also like