Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+2 votes
19.1k views
in Computer by (79.3k points)

Table  "Emp" is shown below Write commands in SQL for (i) to (iv) and output for (v) and (vi)

ID NAME AGE ADDRESS SALARY PHONE
1 Siddharth 25 A-4, Ashok Vihar, Delhi 62000 98110756656
2 Chavi 23 B-21, Model Town, Mumbai 71000 99113423989
3 Karan 26 KC-24, North Avenue, Bhopal 65000 98105393578
4 Raunaq 22 A-152, Gomti Nagar, Lucknow 89000 99101393576
5 Kunal 27 B-5/45, Uday Park, Delhi 80000 97653455654

(i) To display list of all employees below 25 years old.

(ii) To list names and respective salaries in descending order of salary.

(iii) To count the number of employees with names starting with 'K'

(iv) To list names and addresses of those persons who have 'Delhi' in their address.

(v) SELECT Name, Salary FROM Emp where salary between 50000 and 70000;

(vi) SELECT Name, phone from emp where phone like '99%';

1 Answer

+2 votes
by (76.4k points)
selected by
 
Best answer

               OUTPUT

(v) Siddharth 62000 Karan 65000

(vi) Chavi 99713423989 Raunaq 99101393576

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...