RelationalDBDesign RelationalDBDesign


SQL Extensions   «Prev  Next»

SQL*Plus Environment Commands - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 

1. Which of the following commands is an SQL*Plus command and not an SQL command?
Please select the best answer.
  A. GROUP BY
  B. BREAK
  C. INSERT
  D. CONNECT

2. Which of the following phrases is an editing command you can type while in SQL*Plus?
Please select all the correct answers.
  A. C/BRUCE/BRANDON/
  B. L 5
  C. START CUST_BUY
  D. DELETE FROM CUSTOMER


3. Which of the following commands does not execute a file or SQL query in SQL*Plus?
Please select all the correct answers.
  A. @
  B. GET
  C. RUN
  D. /

4. You have the following query:
Please select the best answer.
  A. You must add an SQL*Plus environment command to change the second selected column in this way: The heading should be HI MOM and the column data should be printed on a fresh line.
  B. Which of the following commands is the correct one?
  C. COLUMN UPDATE_DATE HEADING HI_MOM NEW LINE
  D. COLUMN UPD_DATE HEADING "HI MOM" NEWLINE
  E. COLUMN UPD_DATE HEADING "Hi Mom!" FORMAT A40
  F. COLUMN UPDATE_DATE HEADING "HI MOM" NEWLINE


5. Examine the following SQL*Plus script. Which line has a syntax error?
1  TTITLE CENTER "Packages for Sale"  
2  COMPUTE COLUMN OF UNIT_PRICE ON PRODUCT_NAME
3  BREAK ON PRODUCT_NAME ON SALE_PRICE SKIP 1 
4  COLUMN NAME2 FORMAT A15
5  COLUMN PRODUCT_NAME FORMAT A15
6  SELECT
7  P1.PRODUCT_NAME, P1.SALE_PRICE, 
8  P2.PRODUCT_NAME NAME2,
9  P2.SALE_PRICE UNIT_PRICE
10 FROM PRODUCT P1, PRODUCT P2
11 WHERE P1.PRODUCT_ID = P2.PACKAGE_ID
12 ORDER BY P1.PRODUCT_NAME

Please select the best answer.
  A. 2
  B. 4
  C. 5
  D. 10

6. Which of the following commands saves SQL*Plus output into a file named SPINNER.LOG?
Please select the best answer.
  A. SPOOL SPINNER
  B. SAVE SPINNER.LOG
  C. SPOOL SPINNER.LOG
  D. SAVE SPINNER