Multiple choice technology databases

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?

  1. 2

  2. 3

  3. 11

  4. 30

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

With CACHE 10 and ORDER specified, the sequence allocates values in a thread-safe manner. CONNECTION1 gets 1 (first call), CONNECTION2 gets 2 (second call from different connection), then CONNECTION1 gets 3 (third call overall). The ORDER clause guarantees strict ordering even with multiple connections. Option A (2) would be correct only for the second call, and options C and D incorrectly assume larger jumps or connection-specific caching.