Examveda

What will be the output of the following MySQL command?
SELECT emp_id, fname, lname
FROM employee
WHERE title=’HEAD TELLER’;

A. All columns

B. Only those columns which are mention with "SELECT" clause

C. Columns mention with "SELECT" clause and only those rows which contain 'HEAD TELLER' as a "title"

D. None of the mentioned

Answer: Option C

Solution (By Examveda Team)

This MySQL command is used to retrieve information from a table called "employee".
Let's break down the command:
* SELECT emp_id, fname, lname: This part tells MySQL which columns you want to see in the result. It asks for the employee ID (emp_id), first name (fname), and last name (lname).
* FROM employee: This specifies the table from which you want to get the data.
* WHERE title=’HEAD TELLER’: This is a filter. It tells MySQL to only show rows where the "title" column has the value "HEAD TELLER".
So, the correct answer is Option C: Columns mentioned with "SELECT" clause and only those rows which contain 'HEAD TELLER' as a "title".
This command will display the emp_id, fname, and lname columns only for employees whose title is "HEAD TELLER".

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous