成人AV在线无码|婷婷五月激情色,|伊人加勒比二三四区|国产一区激情都市|亚洲AV无码电影|日av韩av无码|天堂在线亚洲Av|无码一区二区影院|成人无码毛片AV|超碰在线看中文字幕

linux常用命令 Oracle觸發(fā)器用法實例詳解?

Oracle觸發(fā)器用法實例詳解?觸發(fā)器和sequence 的使用建表:create table prd (id number not null primary key, name varchar2(2

Oracle觸發(fā)器用法實例詳解?

觸發(fā)器和sequence 的使用建表:create table prd (id number not null primary key, name varchar2(20) , spec varchar2(30) )建sequencecreate sequence prd_seqincrement by 1start with 1nomaxvaluenocyclenocache建觸發(fā)器create or replace trigger prd_trig before insert on prd for each rowwhen(new.id is null) beginselect mgssfcs.prd_seq.nextval into :new.id from dual select sysdate into :new.datetime from dual --不能直接用update或insert語句輸入 end作用:對某一個表或數(shù)據(jù)庫進行操作時,觸發(fā)器內的代碼開始執(zhí)行:可以為本表自動輸入其它字段的值,也可以對別的表進行新增,刪除,更新等各種操作。