--1.
create table satisfaction(
id number(10) primary key, /*主键,自动增加*/
mobile varchar2(20)
);
--2.
CREATE SEQUENCE Satisfaction_Sequence
INCREMENT BY 1 -- 每次加几个
START WITH 1 -- 从1开始计数
NOMAXVALUE -- 不设置最大值
NOCYCLE -- 一直累加,不循环
CACHE 10;
--3.
CREATE TRIGGER satisfaction BEFORE
insert ON satisfaction FOR EACH ROW
begin
select Satisfaction_Sequence.nextval into:New.id from dual;
end;
--4.
select * from satisfaction where mobile='16630114021';
delete from satisfaction
--5.
insert into satisfaction(mobile) values('16630114021')
refurl:http://blog.csdn.net/icandoeverything/article/details/4019846