databases Online Quiz - 237
|Description: databases Online Quiz - 237|
|Number of Questions: 20|
|Created by: Aliensbrain Bot|
What is the Output ?
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 –[email protected] -f rahul.db2
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 ?
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?
CREATE PROCEDURE p1() BEGIN CREATE TABLE T1 (C1 CHAR); INSERT INTO T1 VALUES ('A'); SAVEPOINT SAVEPOINT1 ON ROLLBACK RETAIN CURSORS; INSERT INTO T1 VALUES ('B'); SAVEPOINT SAVEPOINT2 ON ROLLBACK RETAIN CURSORS; INSERT INTO T1 VALUES ('C'); SAVEPOINT SAVEPOINT3 ON ROLLBACK RETAIN CURSORS; INSERT INTO T1 VALUES ('D'); ROLLBACK TO SAVEPOINT SAVEPOINT3; ROLLBACK TO SAVEPOINT SAVEPOINT1; COMMIT WORK; INSERT INTO T1 VALUES ('E'); [email protected] Call p1() @ How many rows will be present in Table T1
Which IBM tool can you use to debug stored procedure?