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

A file rahul.db2 has following content : Drop procedure rahul ( ) @ Create procedure rahul ( ) P1: begin Declare c1 cursor with return to client for Select current date from sysibm.sysdummy1; Open c1; End P1 @ What will following command do when fired on db2 command linedb2 –td@ -f rahul.db2

  1. NO SQL

  2. CONTAINS SQL

  3. READS SQL

  4. MODIFIES SQL


Correct Option: D
  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
  1. CURRENT_CLIENT_ACCT

  2. CURRENT_SCHEMA

  3. CURRENT_DATETIME

  4. CURRENT_PARTITION


Correct Option: B
  1. BIGINT

  2. DECFLOAT

  3. XML

  4. DATETIME


Correct Option: D