IBM DB2 Interview Questions and Answers
Ques 6. What is the difference between a primary key and a unique key in DB2?
Both primary and unique keys enforce the uniqueness of values, but a table can have only one primary key, while it can have multiple unique keys.
Ques 7. How does isolation level affect database transactions in DB2?
Isolation level determines the degree to which one transaction must be isolated from resource changes made by other transactions.
Ques 8. What is a cursor in DB2?
A cursor is a database object that allows for both fetching and updating rows from a result set one at a time.
Ques 9. Explain the purpose of the RUNSTATS command in DB2.
The RUNSTATS command is used to collect statistics about the data in tables and indexes, helping the query optimizer to generate efficient query plans.
Ques 10. What is the purpose of the EXPLAIN statement in DB2?
The EXPLAIN statement is used to analyze and optimize SQL queries by providing information about the access path chosen by the DB2 optimizer.
Most helpful rated by users: