logo

CuriousTab

CuriousTab

Advanced SQL problems


  • 1. A CASE SQL statement is which of the following?

  • Options
  • A. A way to establish an IF-THEN-ELSE in SQL.
  • B. A way to establish a loop in SQL.
  • C. A way to establish a data definition in SQL.
  • D. All of the above.
  • Discuss
  • 2. Which of the following statements is true concerning routines and triggers?

  • Options
  • A. Both consist of procedural code.
  • B. Both have to be called to operate.
  • C. Both run automatically.
  • D. Both are stored in the database.
  • Discuss
  • 3. The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T ;

  • Options
  • A. Equi-join
  • B. Natural join
  • C. Outer join
  • D. Cartesian join
  • Discuss
  • 4. How many tables may be included with a join?

  • Options
  • A. One
  • B. Two
  • C. Three
  • D. All of the above.
  • Discuss
  • 5. Which of the following is a correlated subquery?

  • Options
  • A. Uses the result of an inner query to determine the processing of an outer query.
  • B. Uses the result of an outer query to determine the processing of an inner query.
  • C. Uses the result of an inner query to determine the processing of an inner query.
  • D. Uses the result of an outer query to determine the processing of an outer query.
  • Discuss
  • 6. The joining technique is useful when data from several relations are to be retrieved and displayed and the relationships are not necessarily nested.

  • Options
  • A. True
  • B. False
  • Discuss
  • 7. There should be one condition within the WHERE clause for each pair of tables being joined.

  • Options
  • A. True
  • B. False
  • Discuss
  • 8. A transaction is the complete set of closely related update commands that must all be done, or none of them done, for the database to remain valid.

  • Options
  • A. True
  • B. False
  • Discuss
  • 9. A correlated subquery is where the outer query depends on data from the inner query.

  • Options
  • A. True
  • B. False
  • Discuss
  • 10. The code to create triggers and routines is stored in only one location and is administered centrally.

  • Options
  • A. True
  • B. False
  • Discuss

First 2 3