Skip to main contentSkip to solution

Which of the following SQL statement will display all the records of employee "Mahesh" having employee ID =101 in the relation 'EMPLOYEE' on the basis of 'EMPID'?

Solution

✅ Correct Option: 1

The WHERE clause filters rows using a condition, and SQL uses a single = to test equality. So select * from EMPLOYEE where EMPID=101; returns every column of the row(s) whose EMPID is 101.


Option 4: == is the equality operator in languages like C and Python, but SQL does not accept it.

Option 3: HAVING filters groups after GROUP BY and needs a comparison operator, so it cannot replace a WHERE condition here.

Option 2: "is equal to" is plain English, not SQL syntax.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question