Tag: databases

Questions Related to databases

GET DIAGNOSTICS

  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

Which of the following can be a user defined SQLSTATE

  1. 20000

  2. 35000

  3. 60000

  4. 71000


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

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
  1. BIGINT

  2. DECFLOAT

  3. XML

  4. DATETIME


Correct Option: D

CREATE PROCEDURE testproc( IN i1 INT, INOUT i3 INT) SPECIFIC testproc BEGIN SET i3 = i1; END @ CREATE PROCEDURE testproc( IN i1 INT, INOUT i2 INT, INOUT i3 INT) SPECIFIC testp BEGIN SET i3 = i1 * i2; END @ Given that the statements in the exhibits have executed successfully, which solution contains the complete set of commands that could be used to drop both procedures in the order presented?

  1. DROP PROCEDURE testp; DROP PROCEDURE testp;

  2. DROP PROCEDURE testp; DROP PROCEDURE testproc;

  3. DROP SPECIFIC PROCEDURE testproc; DROP PROCEDURE testproc;

  4. DROP PROCEDURE testproc(INT); DROP PROCEDURE testproc(INT);


Correct Option: C