日期:2014-05-17 浏览次数:21003 次
id varchar(100), username varchar(100), password varchar(100), isAdmin varchar(1),
CREATE SEQUENCE seq_sys_userlist start with 100 increment by 1 MINVALUE 1 MAXVALUE 9999;
create or replace trigger tri_sys_userlist before insert on t_sys_userlist for each row begin select 'u'||lpad(seq_sys_userlist.nextval,4,'0') into :new.id from dual; end ;
insert into t_sys_userlist (username,userpassword,isadmin) values('amy','c8837b23ff8aaa8a2dde915473ce0991','0'); commit;
--改成这样子,重新译下,应该就可以了 :new.id := 'u'||lpad(seq_sys_userlist.nextval,4,'0');