Tag: databases

Questions Related to databases

  1. Is used to obtain info about the previous executed sql statement

  2. Analyze the db2diag error messages

  3. Returns the user ID calling the stored proc

  4. Gives the access plan of the packages


Correct Option: A

What is the Output ?

  1. 1

  2. 0

  3. 10

  4. 11


Correct Option: A

A Simple stored procedure is created with Dynamic Result sets 3 However only 2 cursors with return to client are defined within the source code. What will happen when you call the SP ?

  1. Will executes successfully

  2. Fails as limit is 3 but only 2 opened

  3. Executes with warning

  4. Would not allow compiling the SP at the first place


Correct Option: A

What one is valid special register?

  1. CURRENT_CLIENT_ACCT

  2. CURRENT_SCHEMA

  3. CURRENT_DATETIME

  4. CURRENT_PARTITION


Correct Option: B

What will be the initial value of V_MAX in the declaration statement shown below? DECLARE v_max DECIMAL(9,2);

  1. 0.0

  2. 2

  3. 9

  4. Null


Correct Option: D

Which is not a valid data type in DB2 LUW?

  1. BIGINT

  2. DECFLOAT

  3. XML

  4. DATETIME


Correct Option: D