Advanced SQL Questions and Answers

Take Exam

Advanced SQL covers complex query concepts such as joins, subqueries, indexing, and stored procedures. It is a vital part of technical interviews and database management system exams. Programming questions and answers on SQL help test logical thinking and data-handling capabilities. For candidates preparing for TCS, Infosys, or Cognizant, mastering SQL ensures better performance in technical interviews and database-related tasks. Practice SQL programming questions with answers and download PDFs for revision and self-assessment.

This collection features advanced queries and database management questions. You may also find beginner SQL and database normalization topics useful.
 

Advanced SQL

Showing 10 of 11 questions

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 Report

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 Report

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 Report

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 Report

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 Report

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 Report

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 Report

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 Report

9. How many tables may be included with a join?

  • One
  • Two
  • Three
  • All of the above.
Show Answer Report

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 Report
Questions and Answers for Competitive Exams Various Entrance Test