QuestionQ264

VerifiedRetrieving Data Using the SQL SELECT Statement

You need to generate a mailing-label report for every customer. Each mailing label must contain only the customer name and address. The CUSTOMERS table has these columns:

  • CUST_ID NUMBER(4) NOT NULL -
  • CUST_NAME VARCHAR2(100) NOT NULL
  • CUST_ADDRESS VARCHAR2(150)
  • CUST_PHONE VARCHAR2(20)

Which SELECT statement completes this task?

Explanation

A SQL SELECT list specifies the columns returned by a query. Selecting CUST_NAME and CUST_ADDRESS from CUSTOMERS returns exactly the two fields required for each mailing label and excludes the ID and phone columns.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!