MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following will display all the records in EMPLOYEES table?
A
SELECT salary FROM employees;
B
SELECT * FROM employees;
C
SELECT ALL FROM employees;
D
None of the above
Explanation: 

Detailed explanation-1: -An UPDATE statement without a WHERE clause will update all the rows of the table.

Detailed explanation-2: -Assume that we have the following table of Employee with their respective fields, data types and data. Now assuming the above table, we have to display the employee names whose age is greater than 30. In order to achieve the required result we have use SQL function called as “DATEDIFF".

Detailed explanation-3: -Correct answer is: select job, sum(sal) from emp where comm is null group by job having sum(sal) > 2500; For aggregate functions (COUNT, MAX, MIN, SUM, AVG), GROUP BY clause is mandatory.

There is 1 question to complete.