单选题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.sysdummy1Which value will be returned by the query?()A20B25C50D55

单选题
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.sysdummy1Which value will be returned by the query?()
A

20

B

25

C

50

D

55


参考解析

解析: 暂无解析

相关考题:

Evaluate the following SQL statement used to create the PRODUCTS table:Which statement is true regarding this command?() A. It executes successfully but partition pruning cannot happen for this partition key.B. It produces an error because the TOTAL_VALUE column cannot be used as a partition key.C. It produces an error because compression cannot be used for the TOTAL_VALUE partition key.D. It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in the partitions.

Given the following DDL and INSERT statements:CREATE VIEW v1 AS SELECT col1 FROM t1 WHERE col1 10; CREATE VIEW v2 AS SELECT col1 FROM v1 WITH CASCADED CHECK OPTION; CREATE VIEW v3 AS SELECT col1 FROM v2 WHERE col1 100; INSERT INTO v1 VALUES(5); INSERT INTO v2 VALUES(5); INSERT INTO v3 VALUES(20); INSERT INTO v3 VALUES(100);How many of these INSERT statements will be successful?()A.0B.1C.2D.3

Within the application MY_APP the following PREVIOUS VALUE expression references the sequence MY_SEQ: PREVIOUS VALUE FOR my_seq After which of the following events will the most recently generated value of MY_SEQ persist so that it can be returned to the active MY_APP application?()A.After a ROLLBACK is issuedB.After the sequence is alteredC.After the sequence is droppedD.After the current session ends

Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()A.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))B.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))C.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))D.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

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:con1hvarWhat is the current value of the :con1hvar host variable?()A.2B.3C.11D.30

Which of the following is a characteristic of a sequence?() A.A sequence will never generate duplicate valuesB.The MAXVALUE of a sequence can be equal to the MINVALUEC.It is not possible to create a sequence that generates a constant since the INCREMENT value must be greater than zeroD.When a sequence cycles back to either the MAXVALUE or MINVALUE, it will always be equal to the specified value of either of these two boundaries

Given the following ALTER SEQUENCE statement: ALTER SEQUENCE myseq RESTART WITH 0 INCREMENT BY 1 NO MAXVALUE CACHE 5 ORDER Assuming that the sequence had reached a value of 100 prior to the RESTART, which of the following is true?()A、The next value will be 0 and the sequence will never use the values 101 to 105.B、The next value will be 101 to ensure uniqueness between existing and newly generated sequence values.C、Previously cached values are retained by DB2, and after the restart, will be used for values 101 to 105.D、The next value will be 0 and DB2 will not ensure uniqueness between existing and newly generated values.

Which of the following is a characteristic of a sequence?()A、A sequence will never generate duplicate valuesB、The MAXVALUE of a sequence can be equal to the MINVALUEC、It is not possible to create a sequence that generates a constant since the INCREMENT value must be greater than zeroD、When a sequence cycles back to either the MAXVALUE or MINVALUE, it will always be equal to the specified value of either of these two boundaries

Within the application MY_APP the following PREVIOUS VALUE expression references the sequence MY_SEQ: PREVIOUS VALUE FOR my_seq After which of the following events will the most recently generated value of MY_SEQ persist so that it can be returned to the active MY_APP application?()A、After a ROLLBACK is issuedB、After the sequence is alteredC、After the sequence is droppedD、After the current session ends

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:con1hvarWhat is the current value of the :con1hvar host variable?()A、2B、3C、11D、30

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.sysdummy1Which value will be returned by the query?()A、20B、25C、50D、55

Which two statements about sequences are true? ()A、You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a sequence, without actually retrieving the value.B、You use a CURRVAL pseudo column to look at the current value just generated from a sequence, without affecting the further values to be generated from the sequence.C、You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually retrieving the value from the sequence.D、You use a CURRVAL pseudo column to generate a value from a sequence that would be used for a specified database column.E、If a sequence starting from a value 100 and incremented by 1 is used by more then one application, then all of these applications could have a value of 105 assigned to their column whose value is being generated by the sequence.F、You use REUSE clause when creating a sequence to restart the sequence once it generates the maximum value defined for the sequence.

What is true about sequences? ()A、The start value of the sequence is always 1.B、A sequence always increments by 1.C、The minimum value of an ascending sequence defaults to 1.D、The maximum value of descending sequence defaults to 1.

You created the ORDERS table in your database by using the following code:   SQL CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);   Then, you inserted data in the ORDERS table and saved it by issuing the following statements:SQL INSERT INTO ORDERS VALUES(’18-AUG-00 10:26:44 PM America/New_York’);   SQL INSERT INTO ORDERS VALUES(’23-AUG-02 12:46:34 PM America/New_York’);   SQL COMMIT;   Next, you issued the following statement to change the time zone for the database:   SQL ALTER DATABASE SET TIME_ZONE=’Europe/London’;   What will be the result of executing the above statement?()  A、 The statement will fail.B、 The statement will be executed successfully, and the new time zone will be set for the database.C、 The statement will be executed successfully, but the new time zone will be set for the current session.D、The statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.

Evaluate the following SQL statement used to create the PRODUCTS table:   CREATE TABLE products (product_id NUMBER(3) PRIMARY KEY, product_desc VARCHAR2(25), qtyNUMBER(8,2), rate NUMBER(10,2), total_value AS ( qty * rate)) PARTITION BY RANGE (total_value) (PARTITION p1 VALUES LESS THAN (100000), PARTITION p2 VALUES LESS THAN  (150000), PARTITION p3 VALUES LESS THAN (MAXVALUE))  COMPRESS FOR ALL OPERATIONS;   Which statement is true regarding this command?()  A、 It executes successfully but partition pruning cannot happen for this partition key.B、 It produces an error because the TOTAL_VALUE column cannot be used as a partition key.C、 It produces an error because compression cannot be used for the TOTAL_VALUE partition key. D、 It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in the partitions.

You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to?()A、 IComparerTB、 IEnumerableTC、 IEnumeratorT  D、 IEqualityComparerT

Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()A、CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))B、CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))C、CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))D、CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

问答题What is the next number in the following sequence?  1 - 2 - 3 - 5 - 8 - 13

单选题Within the application MY_APP the following PREVIOUS VALUE expression references the sequence MY_SEQ: PREVIOUS VALUE FOR my_seq After which of the following events will the most recently generated value of MY_SEQ persist so that it can be returned to the active MY_APP application?()AAfter a ROLLBACK is issuedBAfter the sequence is alteredCAfter the sequence is droppedDAfter the current session ends

单选题What is true about sequences?()AThe start value of the sequence is always 1.BA sequence always increments by 1.CThe minimum value of an ascending sequence defaults to 1.DThe maximum value of descending sequence defaults to 1.

单选题Evaluate the following SQL statement used to create the PRODUCTS table:   CREATE TABLE products (product_id NUMBER(3) PRIMARY KEY, product_desc VARCHAR2(25), qtyNUMBER(8,2), rate NUMBER(10,2), total_value AS ( qty * rate)) PARTITION BY RANGE (total_value) (PARTITION p1 VALUES LESS THAN (100000), PARTITION p2 VALUES LESS THAN  (150000), PARTITION p3 VALUES LESS THAN (MAXVALUE))  COMPRESS FOR ALL OPERATIONS;   Which statement is true regarding this command?()A It executes successfully but partition pruning cannot happen for this partition key.B It produces an error because the TOTAL_VALUE column cannot be used as a partition key.C It produces an error because compression cannot be used for the TOTAL_VALUE partition key. D It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in the partitions.

单选题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:con1hvarWhat is the current value of the :con1hvar host variable?()A2B3C11D30

单选题You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to?()A IComparerTB IEnumerableTC IEnumeratorT  D IEqualityComparerT

单选题You created the ORDERS table in your database by using the following code:   SQL CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);   Then, you inserted data in the ORDERS table and saved it by issuing the following statements:SQL INSERT INTO ORDERS VALUES(’18-AUG-00 10:26:44 PM America/New_York’);   SQL INSERT INTO ORDERS VALUES(’23-AUG-02 12:46:34 PM America/New_York’);   SQL COMMIT;   Next, you issued the following statement to change the time zone for the database:   SQL ALTER DATABASE SET TIME_ZONE=’Europe/London’;   What will be the result of executing the above statement?()A The statement will fail.B The statement will be executed successfully, and the new time zone will be set for the database.C The statement will be executed successfully, but the new time zone will be set for the current session.DThe statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.

单选题Given the following ALTER SEQUENCE statement: ALTER SEQUENCE myseq RESTART WITH 0 INCREMENT BY 1 NO MAXVALUE CACHE 5 ORDER Assuming that the sequence had reached a value of 100 prior to the RESTART, which of the following is true?()AThe next value will be 0 and the sequence will never use the values 101 to 105.BThe next value will be 101 to ensure uniqueness between existing and newly generated sequence values.CPreviously cached values are retained by DB2, and after the restart, will be used for values 101 to 105.DThe next value will be 0 and DB2 will not ensure uniqueness between existing and newly generated values.

单选题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.sysdummy1Which value will be returned by the query?()A20B25C50D55

单选题Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()ACREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))BCREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))CCREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))DCREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

单选题Which of the following is a characteristic of a sequence?()AA sequence will never generate duplicate valuesBThe MAXVALUE of a sequence can be equal to the MINVALUECIt is not possible to create a sequence that generates a constant since the INCREMENT value must be greater than zeroDWhen a sequence cycles back to either the MAXVALUE or MINVALUE, it will always be equal to the specified value of either of these two boundaries