Which of the following statements is true about the above query?

You work as a Database Administrator for Domain.com. The company uses MySQL as its
database development platform. You have created a table named Employees in the database.
You want to display the names of the employees whose salary is more than $5000, but you do not
want to display any duplicate content. Therefore, you have written the following query:
SELECT emp_id, DISTINCT emp_name WHERE salary > 5000
FROM Employees;
Which of the following statements is true about the above query?

You work as a Database Administrator for Domain.com. The company uses MySQL as its
database development platform. You have created a table named Employees in the database.
You want to display the names of the employees whose salary is more than $5000, but you do not
want to display any duplicate content. Therefore, you have written the following query:
SELECT emp_id, DISTINCT emp_name WHERE salary > 5000
FROM Employees;
Which of the following statements is true about the above query?

A.
The statement will display only unique names whose salary is more than $5000.

B.
The UNIQUE clause should be used in place of the DISTINCT clause.

C.
The statement will give an error.

D.
The statement will display those records whose salary is more than $5000.



Leave a Reply 1

Your email address will not be published. Required fields are marked *