分页:
select * from (select a.*,rownum rn from (select a, b, c, d from haha where 1=1) group by (a, b, c, d)) aa where rownum<=20) where rn>10;
触发器:
create or replace trigger user1_chufa18
after delete or insert or update on user1
for each row
begin
if deleting then
delete from user1 where id =:old.id;
end if;
if inserting then
insert into user1 (id,name)
values (:new.id,:new.name);
end if;
if updating then
UPDATE user1
SET name=:new.name
where id =:old.id;
end if;
end user1_chufa18;
create or replace trigger user_chufa00
before insert on tab_user
for each row
declare
-- local variables here
begin
if inserting then
insert into user1 (id,username,password,realname,sex,cid,certtype,cert,birtyday,usertype,comments,rules,state,operator,operatordate)
values
(:new.id,:new.username,:new.password,,:new.realname,:new.sex,:new.cid,:new.certtype,:new.cert,:new.birthday,:new.usertype,:new.comments,:new.rules,:new.state,:new.operator,:new.operatordate
);end if;
end user_chufa00;