在Oracle中需要通过自增序列SEQUENCE(序列)和触发器来实现递增列的创建
![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
--触发器代码
create or replace trigger myTest
before insert on myTable
referencing old as old_value new as new_value
for each row
begin
new_value.userid= s_id.nextval;
end;
在Oracle中需要通过自增序列SEQUENCE(序列)和触发器来实现递增列的创建
转载于:https://www.cnblogs.com/bluewind2879/archive/2008/10/28/1321249.html