0

databases Online Quiz - 237

Description: databases Online Quiz - 237
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. Not NULL

  2. Primary key

  3. Foreign key

  4. Composite primary keys


Correct Option: D
  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C
  1. System tablespace

  2. Users tablespace

  3. Default tablespace for the user

  4. Undefined


Correct Option: C
  1. Simplifies code reuse, code standardization and code maintenance

  2. Controlled access to other database objects

  3. Improving application performance

  4. DB2 Stored Procedures can be written only in SQL.


Correct Option: D

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

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

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
  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

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

Which IBM tool can you use to debug stored procedure?

  1. Control centre

  2. IBM Data studio

  3. Visual Explain

  4. Command editor


Correct Option: B
- Hide questions