SQL MCQ - Subquery And Transactions

11. Which of the following statement is FALSE about transaction?

A. Once the data is committed it can be rolled back
B. All operations within the transaction must all succeed or fail
C. Transaction includes at least one statement
D. Transaction changes the database from one consistent state to another

View Answer


12. Which of the following statements are False regarding subqueries?

A. Only two subqueries can be placed at one level
B. A subquery can appear on either side of a comparison operator
C. Both A and B
D. None of the above

View Answer


13. Which of the following statements does not change the state of the database?

A. Where
B. Select
C. Insert
D. Drop

View Answer


14. What is TRUE regarding Independent Subquery?

A. Equality operator can only be used if subquery returns only one row.
B. IN operator can be used if subquery returns multiple rows.
C. Both A and B
D. None of the above

View Answer


15. Independent sub query is the one where

A. the inner and the outer query are from two different tables
B. the inner query has no reference to the outer query
C. the inner and outer queries are for the same table but with different condition
D. None of the above

View Answer


16. What is a subquery?

A. A subquery is a select-from-where expression that is nested within another query
B. A subquery is any query that is nested within another query
C. A subquery is a relation that is externally specified which can be used to handle data in queries
D. A subquery is a condition that excludes all the invalid tuples from the database

View Answer


17. Which of the following systems is responsible for ensuring isolation?

A. Recovery system
B. Atomic system
C. Concurrency control system
D. Compiler system

View Answer


18. Which of the following is not a transaction state?

A. Active
B. Partially committed
C. Failed
D. Compensated

View Answer


19. Which of the following operators cannot be used in a sub-query?

A. AND
B. <
C. >
D. <>

View Answer


20. Consider two statements about outer and inner queries in context of SQL sub-queries?
i. The inner queries can get data from only one table
ii. The inner queries can get data from more than one table Which of the above statements are true?

A. Only i
B. Only ii
C. Both i and ii
D. None of the above

View Answer






Also check :


Discussion


* You must be logged in to add comment.