Home  >  Article  >  Database  >  Oracle中创建自增字段方法

Oracle中创建自增字段方法

WBOY
WBOYOriginal
2016-06-07 17:11:281061browse

在Oracle数据库中,没有Oracle自增字段这样的功能,但是通过触发器(trigger)和序列(sequence)可以实现。假设[表test]关键字段为i

:NEW 和:OLD使用方法和意义,new 只出现在insert和update时,old只出现在update和delete时。在insert时new表示新插入的行数据,,update时new 表示要替换的新数据、old表示要被更改的原来的数据行,delete时old表示要被删除的数据。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn