本文介绍了如何在Apache Derby中使用SEQUENCE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Apache Derby 10.7中使用SEQUENCE支持。我使用以下语句创建了序列:

I'd like to use SEQUENCE support in Apache Derby 10.7. I've created the sequence with the following statement:

CREATE SEQUENCE SAMPLE_SEQ AS INT MAXVALUE 999999 CYCLE;

如何从 SAMPLE_SEQ ?你可以帮我解决这个问题吗?

How can I select next/current value from the SAMPLE_SEQ? Could you please help me out with the query?

推荐答案

Apache Derby Doc说:

Apache Derby Doc says: Use a NEXT VALUE FOR expression

应该像

SELECT NEXT VALUE FOR SAMPLE_SEQ;

这篇关于如何在Apache Derby中使用SEQUENCE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 03:45