Database - Advanced SQL Question and Answer

Database - Advanced SQL Question and Answer
1. Which of the following statements is true concerning routines and triggers?
  • Both consist of procedural code.
  • Both have to be called to operate.
  • Both run automatically.
  • Both are stored in the database.
Show Answer
2. Which of the following is one of the basic approaches for joining tables?
  • Subqueries
  • Union Join
  • Natural join
  • All of the above
Show Answer
3. Which of the following is true concerning systems information in an RDBMS?
  • RDBMS store database definition information in system-created tables.
  • This information can be accessed using SQL
  • This information often cannot be updated by a user.
  • All of the above.
Show Answer
4. 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 WHERE CUSTOMER_T. CUSTOMER_ID = ORDER_T. CUSTOMER_ID
  • Equi-join
  • Natural join
  • Outer join
  • Cartesian join
Show Answer
5. Embedded SQL is which of the following?
  • Hard-coded SQL statements in a program language such as Java.
  • The process of making an application capable of generating specific SQL code on the fly.
  • Hard-coded SQL statements in a procedure.
  • Hard-coded SQL statements in a trigger.
Show Answer
6. A UNION query is which of the following?
  • Combines the output from no more than two queries and must include the same number of columns.
  • Combines the output from no more than two queries and does not include the same number of columns.
  • Combines the output from multiple queries and must include the same number of columns.
  • Combines the output from multiple queries and does not include the same number of columns.
Show Answer
7. Which of the following statements is true concerning subqueries?
  • Involves the use of an inner and outer query.
  • Cannot return the same result as a query that is not a subquery.
  • Does not start with the word SELECT.
  • All of the above.
Show Answer
8. Which of the following is a correlated subquery?
  • Uses the result of an inner query to determine the processing of an outer query.
  • Uses the result of an outer query to determine the processing of an inner query.
  • Uses the result of an inner query to determine the processing of an inner query.
  • Uses the result of an outer query to determine the processing of an outer query.
Show Answer
9. How many tables may be included with a join?
  • One
  • Two
  • Three
  • All of the above.
Show Answer
10. 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 ;
  • Equi-join
  • Natural join
  • Outer join
  • Cartesian join
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test