Oracle Database Sql Certified Associate · Free Practice Question Easy

Question 22

View and examine the following available responses.

Indicate the query which will create a projection of the ENAME and DEPTNO columns from the EMPLOYEES table.

  • A
  • B
  • C
  • D
Reveal correct answer

Correct answer: D

Explanation

Projection means a SELECT query.

Evaluate each query to determine which one correctly creates a projection of the ENAME and DEPTNO columns from the EMPLOYEES table.

Correct Answer:

  • This correctly selects (i.e., projects) only the ename and deptno columns from the employees table.

  • Syntax is valid.

  • Matches the question exactly.

  • The only correct query that produces a valid projection of the ENAME and DEPTNO columns from the EMPLOYEES table.

Incorrect Options:

    • Table name is emp, not employees, so not correct unless emp is an alias (which it isn’t here).

    • This selects an extra column (dept_location) — not just a projection of ename and deptno.

    • Missing closing quote on the alias "employee_name. This will cause a syntax error.

A. This query is incorrect because it includes the 'dept_location' column in the projection, which is not specified in the question. It should only project the 'ENAME' and 'DEPTNO' columns.

B. This query is incorrect because it has a syntax error in the column alias for 'ENAME'. The alias is missing the closing double quotation mark, which would result in a syntax error when executed.

C. This query is incorrect because it references the table as 'emp' instead of 'employees' and may result in a table or view not found error.

D. This query is correct as it selects the 'ENAME' and 'DEPTNO' columns from the 'employees' table, which matches the requirement of creating a projection of those specific columns.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need