Advanced SQL Questions and Answers

Practice Mode
Showing 10 of 11 questions
Q1
Which of the following statements is true concerning routines and triggers?
  • 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.
Answer: Option A
Q2
Which of the following is one of the basic approaches for joining tables?
  • A Subqueries
  • B Union Join
  • C Natural join
  • D All of the above
Answer: Option D
Q3
Which of the following is true concerning systems information in an RDBMS?
  • A RDBMS store database definition information in system-created tables.
  • B This information can be accessed using SQL
  • C This information often cannot be updated by a user.
  • D All of the above.
Answer: Option D
Q4
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
  • A Equi-join
  • B Natural join
  • C Outer join
  • D Cartesian join
Answer: Option A
Q5
Embedded SQL is which of the following?
  • A Hard-coded SQL statements in a program language such as Java.
  • B The process of making an application capable of generating specific SQL code on the fly.
  • C Hard-coded SQL statements in a procedure.
  • D Hard-coded SQL statements in a trigger.
Answer: Option A
Q6
A UNION query is which of the following?
  • A Combines the output from no more than two queries and must include the same number of columns.
  • B Combines the output from no more than two queries and does not include the same number of columns.
  • C Combines the output from multiple queries and must include the same number of columns.
  • D Combines the output from multiple queries and does not include the same number of columns.
Answer: Option C
Q7
Which of the following statements is true concerning subqueries?
  • A Involves the use of an inner and outer query.
  • B Cannot return the same result as a query that is not a subquery.
  • C Does not start with the word SELECT.
  • D All of the above.
Answer: Option A
Q8
Which of the following is a correlated subquery?
  • 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.
Answer: Option A
Q9
How many tables may be included with a join?
  • A One
  • B Two
  • C Three
  • D All of the above.
Answer: Option D
Q10
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 ;
  • A Equi-join
  • B Natural join
  • C Outer join
  • D Cartesian join
Answer: Option D
Database
Back to Database
Questions and Answers for Competitive Exams Various Entrance Test