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

Lab Assignment 2 1. Create Table Emp Which Has The Following Attributes (Employee Table) (Empno, Ename, Job, Sal, Deptno)

The document outlines a lab assignment to practice SQL queries on an employee table with attributes like employee number, name, job, salary, and department number. The assignment involves creating the table, inserting records, and querying the data to return employee names and details based on various criteria like department number, salary amount, job type, and name patterns. Queries include filtering by ranges, sorting results, and searching for specific character patterns within names.

Uploaded by

Dhruv Sehgal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Lab Assignment 2 1. Create Table Emp Which Has The Following Attributes (Employee Table) (Empno, Ename, Job, Sal, Deptno)

The document outlines a lab assignment to practice SQL queries on an employee table with attributes like employee number, name, job, salary, and department number. The assignment involves creating the table, inserting records, and querying the data to return employee names and details based on various criteria like department number, salary amount, job type, and name patterns. Queries include filtering by ranges, sorting results, and searching for specific character patterns within names.

Uploaded by

Dhruv Sehgal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Lab Assignment 2

1. Create table emp which has the following attributes (employee


table)
(empno, ename, job, sal, deptno)

2. Insert appropriate records in above tables.

3. Get employee no and employee name who works in dept no 10

4. Display the employee names of those clerks whose salary >


2000

5. Display name and sal of Salesperson & Clerks

6. Display all details of employees whose salary between 2000


and 3000

7. Display all details of employees whose dept no is 10, 20, or 30

8. Display name of those employees whose commission is NULL

9. Display dept no & salary in ascending order of dept no and


within each dept nosalary should be in descending order.

10. Display name of employees that starts with C

11. Display name of employees that ends with with C

12. Display name of employees having two a or A chars in the


name

13. Display the name of the employees whose second char is b


or B

14. Display the name of the employees whose first or last char is
a or A

You might also like