oracle 如何使用oracle sequence.nextval
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40790428/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use oracle sequence.nextval
提问by Jan Maděra
I need to increment my id. I have to increment by using sequence in oracle database. When i use INSERT INTO XXX (seq_xxx.nextval, ....)
i have error invalid column name
.
我需要增加我的id。我必须通过在 oracle 数据库中使用序列来增加。当我使用INSERT INTO XXX (seq_xxx.nextval, ....)
我有错误invalid column name
。
EDIT: The problem was in capital letters SEQ_XXX.NEXTVAL
is working fine.
编辑:问题是大写字母SEQ_XXX.NEXTVAL
工作正常。
回答by flyaround
Insert Statement in Oracle:
在 Oracle 中插入语句:
insert into XXX (id, ...) values (seq_xxx.nextVal, ...)
Note:(id, ...) = table column names
注意:(id, ...) = 表列名