0

databases Online Quiz - 198

Description: databases Online Quiz - 198
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

A declared temporary table is used for which of the following purposes?

  1. Backup purposes

  2. Storing intermediate results

  3. Staging area for load operations

  4. Sharing result data sets between applications


Correct Option: B

what is the maximum number of triggers can apply on a single table

  1. 4

  2. no limit

  3. 24

  4. 12


Correct Option: D

When you open a cursor, DB2 will always get all rows that meet the selection criteria and create a result set?

  1. Yes

  2. No

  3. It Depends

  4. None of the above


Correct Option: B

Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?

  1. The cursor is moved to another row

  2. The row the cursor is on is deleted by the application

  3. The row the cursor is on is deleted by another application

  4. The row the cursor is on needs to be updated by another application


Correct Option: B

B37 abend during SPUFI is due to

  1. Space Issues

  2. Data Issues

  3. No records found while querying the table

  4. Both a & b


Correct Option: A

An application has acquired a Share lock on a row in a table and now wishes to update the row. Which of the following statements is true?

  1. The application must release the row-level Share lock it holds and acquire an Update lock on the row

  2. The application must release the row-level Share lock it holds and acquire an Update lock on the table

  3. The row-level Share lock will automatically be converted to a row-level Up-date lock

  4. The row-level Share lock will automatically be escalated to a table-level Up-date lock


Correct Option: C

Which of the following is used to indicate a column will not accept NULL values and can be referenced in another table's foreign key specification?

  1. Check constraint

  2. Default constraint

  3. Unique constraint

  4. Informational constraint


Correct Option: C

What authority is required to create a table?

  1. ADMIN Privileges

  2. CREATETAB Privileges

  3. No Privileges

  4. USERTAB Privileges


Correct Option: B

Given the following scenario: Table TABLE1 needs to hold specific numeric values up to 9999999.999 in column COL1. Once TABLE1 is populated, arithmetic operations will be performed on data stored in col-umn COL1. Which of the following would be the most appropriate DB2 data type to use for column COL1?

  1. INTEGER

  2. REAL

  3. NUMERIC (7,3)

  4. DECIMAL(10,3)


Correct Option: D

Which of the following tools can be used to automate table reorganization Operations ?

  1. Control Center

  2. Command Center

  3. Command Line Processor

  4. Task Center


Correct Option: D

How do you find the total number of rows in a table ?

  1. SELECT COUNT *

  2. SELECT COUNT(*)

  3. SELECT COUNT[*]

  4. SELECT COUNT(ALL)


Correct Option: B

Given the following statement: CREATE TABLE t1 col1  SMALLINT NOT NULL PRIMARY KEY, col2  VARCHAR(200) NOT NULL WITH DEFAULT NONE, col3  DECIMAL(5,2) CHECK (col3 >= 100.00), col4  DATE NOT NULL WITH DEFAULT) Which of the following definitions will cause the CREATE TABLE statement to fail?

  1. COL1

  2. COL2

  3. COL3

  4. COL4


Correct Option: B

When you open a cursor, DB2 will always get all rows that meet the selection criteria and create a result set?

  1. Yes

  2. No

  3. It Depends

  4. None of the above


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of cursors in DB2.

A cursor is a database object that allows you to retrieve and manipulate rows from a result set one at a time. When you open a cursor in DB2, it does not automatically fetch all the rows that meet the selection criteria and create a result set. Instead, it establishes a connection to the database and sets up a context for retrieving rows.

Therefore, the correct answer is:

B. No - When you open a cursor in DB2, it does not automatically get all rows that meet the selection criteria and create a result set.

Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?

  1. The cursor is moved to another row

  2. The row the cursor is on is deleted by the application

  3. The row the cursor is on is deleted by another application

  4. The row the cursor is on needs to be updated by another application


Correct Option: B

When the program name is not in the plan, we get

  1. -810

  2. -801

  3. -805

  4. -825


Correct Option: C

B37 abend during SPUFI is due to

  1. Space Issues

  2. Data Issues

  3. No records found while querying the table

  4. Both a & b


Correct Option: A

An application has acquired a Share lock on a row in a table and now wishes to update the row. Which of the following statements is true?

  1. The application must release the row-level Share lock it holds and acquire an Update lock on the row

  2. The application must release the row-level Share lock it holds and acquire an Update lock on the table

  3. The row-level Share lock will automatically be converted to a row-level Up-date lock

  4. The row-level Share lock will automatically be escalated to a table-level Up-date lock


Correct Option: C

Which of the following is used to indicate a column will not accept NULL values and can be referenced in another table's foreign key specification?

  1. Check constraint

  2. Default constraint

  3. Unique constraint

  4. Informational constraint


Correct Option: C

What authority is required to create a table?

  1. ADMIN Privileges

  2. CREATETAB Privileges

  3. No Privileges

  4. USERTAB Privileges


Correct Option: B
- Hide questions