Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 73

Examine the description of the EMPLOYEES table:

Which statement will execute successfully, returning distinct employees with non-null first names?

    Correct Answer: C

    The correct SQL statement will successfully execute and return distinct employees with non-null first names is: SELECT DISTINCT * FROM employees WHERE first_name IS NOT NULL. This query ensures that only rows with non-null first names are selected, and the DISTINCT keyword ensures that duplicate rows are excluded.

Discussion
lucemqyOption: C

Not valid to compare NULL to any value must use IS NOT NULL or IS NULL

metallersOption: C

C is OK, last comment was a mistake.

CyberPOption: C

Distinct should come first after select, also we use is not null so it is C.

metallersOption: A

AD are the correct answers

Mcromeo

do you think you can get rows with this expression first_name <> NULL ?