MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following query finds employees with an experience more than 5?
A
Select * From DataFlair where experience>5;
B
Select * From DataFlair;
C
Select * From DataFlair where experience>=5;
D
Select * From DataFlair where experience<=5;
Explanation: 

Detailed explanation-1: -Display the names of the employees who are working in the company for the past 5 years. Ans: select ename from emp where to char (sysdate, ’YYYY’)-to char (hiredate, ’YYYY’) >=5; Display the list of employees who have joined the company before30-JUN-90 or after 31-DEC-90.

Detailed explanation-2: -Try using this SQL SELECT statement: SELECT * FROM employees WHERE department id=30 AND salary = (SELECT MAX(salary) FROM employees WHERE department id=30); This will return the employee information for only the employee in department 30 that has the highest salary.

There is 1 question to complete.