Machine-translated by Google. Questions are authored in English.
Top

Discussion

To define what columns should be displayed in an SQL SELECT statement:

  • A.use FROM to name the source table(s) and list the columns to be shown after SELECT.
  • B.use USING to name the source table(s) and list the columns to be shown after SELECT.
  • C.use SELECT to name the source table(s) and list the columns to be shown after USING.
  • D.use USING to name the source table(s) and list the columns to be shown after WHERE.

Answer: A

Correct answer: use FROM to name the source table(s) and list the columns to be shown after SELECT.

Each clause has one job. FROM names the source - a table, several joined tables, a view or a subquery - and the SELECT list names the columns to be returned from it.

In relational terms these are the two basic operations: SELECT performs projection, choosing columns, and WHERE performs selection, choosing rows. USING exists in SQL but for a narrower purpose - naming the shared column in a join, as in JOIN orders USING (customer_id) - and never names the source table.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.