What is the current value of the :con1hvar host variable?
A sequence was created with the DDL statement shown below:
CREATE SEQUENCE my_sequence CACHE 10 ORDER
The following statements are successfully executed in sequence through separate database
connections:
CONNECTION1 – VALUES NEXT VALUE FOR my_sequence INTO :con1hvar
CONNECTION2 – VALUES NEXT VALUE FOR my_sequence INTO :con2hvar
CONNECTION1 – VALUES NEXT VALUE FOR my_sequence INTO :con1hvar
What is the current value of the :con1hvar host variable?
Which value will be returned by the query?
A sequence was created with the DDL statement shown below:
CREATE SEQUENCE my_seq START WITH 5 INCREMENT BY 5 CACHE 5
User1 successfully executes the following statements in Connection1:
VALUES NEXT VALUE FOR my_seq INTO :con1hvar
VALUES NEXT VALUE FOR my_seq INTO :con1hvar
User2 successfully executes the following statement in Connection2:
VALUES NEXT VALUE FOR my_seq INTO :con2hvar
After User1 & User2 are finished, User3 executes the following statement in Connection3:
SELECT NEXT VALUE FOR my_seq FROM sysibm.sysdummy1
Which value will be returned by the query?
which DB2 object?
An Alias can be an alternate name for which DB2 object?
Which of the following objects contains control structures that are considered the bound form of SQL statement
Which of the following objects contains control structures that are considered the bound form of
SQL statements?
Which of the following commands is used to retrieve database names from the local catalog for DRDA host databa
Which of the following commands is used to retrieve database names from the local catalog for
DRDA host databases on System i and System z?
Which of the following are types of routine objects?
Which of the following are types of routine objects?
which DB2 object?
A stored procedure object is created into which DB2 object?
How many rows will be deleted by the following DELETE statement?
The following statements:
CREATE TABLE t1 (col1 INT NOT NULL, PRIMARY KEY (col1));
CREATE TABLE t2 (col1 INT NOT NULL, col2 CHAR(1) NOT NULL, PRIMARY KEY (col1, col2),
FOREIGN KEY (col1) REFERENCES t1 (col1)
ON DELETE CASCADE ON UPDATE RESTRICT);
CREATE TABLE t3 (col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (col1, col2),
FOREIGN KEY (col1) REFERENCES t1 (col1)
ON DELETE NO ACTION ON UPDATE RESTRICT);
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1, ‘a’), (1, ‘b’), (2,’c’);
INSERT INTO t3 VALUES (1, 100), (2, 200), (2,300);
How many rows will be deleted by the following DELETE statement? DELETE FROM t1 WHERE
col1 = 1;
Which of the following database objects can be used to accomplish this?
A number of applications issue the following SQL statement:
SELECT d.deptno, e.empno, e.salary FROM department d INNER JOIN employee e ON d.deptno
= e.deptno
A database administrator wishes to store this query within the database. Which of the following
database objects can be used to accomplish this?
What is the result of the following query?
Given the following statements:
CREATE TABLE tab1 (col1 INT);
CREATE TABLE tab2 (col1 INT);
CREATE TRIGGER trig1 AFTER UPDATE ON tab1
REFERENCING NEW AS new1
FOR EACH ROW MODE DB2SQL
INSERT INTO tab2 VALUES(new1.col1);
INSERT INTO tab1 VALUES(2),(3);
What is the result of the following query?
SELECT count(*) FROM tab2;