Top 50+ Solved SQL MCQ Questions Answer
Q. What type of join is needed when you wish to return rows that do have matching values?
a. Equi-join
b. Natural join
c. Outer join
d. All of the Mentioned
Q. 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 Mentioned
Q. 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
Q. 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
Q. 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 mentioned
Q. 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
Q. 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
Q. Which is not a type of join in T-SQL?
a. Equi-join
b. Natural join
c. Outer join
d. Cartesian join
Q. What is a view?
a. A view is a special stored procedure executed when certain event occurs
b. A view is a virtual table which results of executing a pre-compiled query
c. A view is a database diagram
d. None of the Mentioned
Q. Which of the following is not a limitation of view?
a. ORDER BY Does Not Work
b. Index Created on View Used Often
c. Cross Database Queries Not Allowed in Indexed View
d. Adding Column is Expensive by Joining Table Outside View
Q. Which of the following statement is true?
a. Views could be looked as an additional layer on the table which enables us to protect intricate or sensitive data based upon our needs
b. Views are virtual tables that are compiled at run time
c. Creating views can improve query response time
d. All of the Mentioned
Q. Dynamic Management View is a type of ___________
a. System Defined Views
b. User Defined View
c. Simple View
d. Complex View
Q. Syntax for creating views is __________
a. CREATE VIEW AS SELECT
b. CREATE VIEW AS UPDATE
c. DROP VIEW AS SELECT
d. CREATE VIEW AS UPDATE
Q. You can delete a view with ___________ command.
a. DROP VIEW
b. DELETE VIEW
c. REMOVE VIEW
d. TRUNCATE VIEW