Examveda

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

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" and start_date as 2008-11-24

D. None of the mentioned

Answer: Option C

Solution (By Examveda Team)

This question is about understanding how the SELECT statement works in MySQL. Let's break it down:

The command:
SELECT emp_id, fname, lname
FROM employee
WHERE title=’HEAD TELLER’ AND start_date=2008-11-24;

This command asks the database to:
1. SELECT specific columns: emp_id, fname, lname
2. FROM the table named employee
3. WHERE two conditions are met:
* The title column has the value 'HEAD TELLER'
* The start_date column is equal to 2008-11-24

Therefore, the correct answer is:
Option C: Columns mention with "SELECT" clause and only those rows which contain 'HEAD TELLER' as a "title" and start_date as 2008-11-24

The command will only return the emp_id, fname, and lname columns for those employees who have the job title 'HEAD TELLER' and started working on 2008-11-24.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous