Friday, October 21, 2011

Oracle :: Exemplo de Create Table // Sequence // Triggers

Create Table T (pk number);

Create Sequence T_SEQ;

Create Trigger T_Trigger before insert on T for each row
Begin
   select t_seq.nextval into :new.pk from dual
End;

No comments: