SQL Subquery And Transactions MCQ

Subquery And Transactions MCQs : This section focuses on the "Subquery And Transactions" of the SQL. These Multiple Choice Questions (mcq) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. Which of the following statements are TRUE regarding subqueries?

A. A subquery can retrieve zero or more rows
B. A subquery can appear on either side of a comparison operator
C. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement
D. Both A and B

View Answer

2. Which of the following statement(s) is TRUE regarding subqueries?

A. Inner queries in WHERE clause can contain ORDER BY
B. Outer query and inner query can get data from different tables
C. Outer query and inner query must get data from the same table
D. Inner queries cannot contain GROUP BY clause

View Answer

3. Which ACID property specifies that once the transaction is committed, its permanent even in case of power failures?

A. Atomicity
B. Consistency
C. Isolation
D. Durability

View Answer

4. Where subqueries can not be used?

A. Field names in the SELECT statement
B. The WHERE clause only in the SELECT statement
C. The WHERE clause in SELECT as well as all DML statements
D. The FROM clause in the SELECT statement

View Answer

5. Select * from student join takes using (ID); The above query is equivalent to ____________

A. Select * from student inner join takes using (ID);
B. Select * from student outer join takes using (ID);
C. Select * from student left outer join takes using (ID);
D. All of the mentioned

View Answer

6. The ______ construct returns true if a given tuple is present in the subquery.

A. not exists
B. present
C. not present
D. exists

View Answer

7.  What is a correlated sub-query?

A. An independent query that uses the correlation name of another independent query.
B. A sub-query that uses the correlation name of an outer query
C. A sub-query that substitutes the names of the outer query
D. A sub-query that does not depend on its outer query's correlation names

View Answer

8. SQL subqueries that can occur wherever a value is permitted provided the subquery gives only one tuple with a single attribute are called _________

A. Exact Subqueries
B. Vector Subqueries
C. Positive Subqueries
D. Scalar Subqueries

View Answer

9. A transaction that has not been completed successfully is called as _______

A. Compensating transaction
B. Aborted transaction
C. Active transaction
D. Partially committed transaction

View Answer

10. The scheme that controls the interaction between executing transactions is called as _____

A. Concurrency control scheme
B. Multiprogramming scheme
C. Serialization scheme
D. Schedule scheme

View Answer

Also check :


* You must be logged in to add comment.