首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > IBM DB2 >

求解730里面一道关于sequence的题目,该怎么解决

2012-03-07 
求解730里面一道关于sequence的题目Q: 14 A sequence was created with the DDL statement shown below:CR

求解730里面一道关于sequence的题目
Q: 14 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?
A. 20
B. 25
C. 50
D. 55

这道题的答案给出是D,应该如何解释。我在自己的环境上模拟的3用户3次connection得出的结果是A啊,答案是错误的么

转载请注明源自www.DB2China.net,请保留版权. 
原文地址:http://www.db2china.net/club/thread-7054-1-1.html

[解决办法]
就是做完一个断开一个的连接
到连接3的时候就是55

热点排行