创建一个序列:
create sequence example_seq
increment by 1
start with 1
minvalue 1
cache 20;
在example表上创建一个触发器
create or replace trigger "portal".tri_example_table before insert on example_table for each row
begin
select example_seq.nextval into :new.example_id from dual;
end;
如果系统不算庞大,那么创建一个序列就可以了,但需要为多个表创建多个触发器来生成流水号。
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器