0% found this document useful (0 votes)
51 views2 pages

Ass 3 Remaining

The document contains questions about writing SQL queries to retrieve employee data from a database table based on certain conditions on name, department, hire date and other fields. It asks to write queries to find employees whose email contains exactly one character between E and S, employees whose name has a as third letter, employees with both a and e in their name and employees whose name starts with J, A or M ordered by name.

Uploaded by

Saloni Vani
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)
51 views2 pages

Ass 3 Remaining

The document contains questions about writing SQL queries to retrieve employee data from a database table based on certain conditions on name, department, hire date and other fields. It asks to write queries to find employees whose email contains exactly one character between E and S, employees whose name has a as third letter, employees with both a and e in their name and employees whose name starts with J, A or M ordered by name.

Uploaded by

Saloni Vani
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/ 2

Medi-Caps University

Department of Computer Science and Engineering


Database Management System (CS3CO39)

Enrollment No: EN23CS3L1018 Date of Conduction:12-02-24

Student Name: Saloni Vani Date of Submission:

27. Display the last name, first name, manager id and email of those employees whose email contains
exactly one character that appears between E and S.

Query= select ename,mgr,deptno,hiredate from emp where job like '%E_S%';

28. Display all employee last names in which the third letter of the name is a.

Query=select * from emp where ename like ' A%';

29. Display the last name of all employees who have both an a and an e in their last name.

Query=select * from emp where ename like '%A_E%';

30. Write a query that displays the last name (with the first letter uppercase and all other letters lowercase) and
the length of the last name for all employees whose name starts with the letters J, A, or M.. Sort the results
by the employees’ last names

Query=select initcap(ename),length(ename) from emp where ename like 'B%' or ename like 'A%' order by
ename;
Medi-Caps University
Department of Computer Science and Engineering
Database Management System (CS3CO39)

Enrollment No: EN23CS3L1018 Date of Conduction:12-02-24

Student Name: Saloni Vani Date of Submission:

You might also like