태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

create table board(
num number not null primary key,
subject varchar2(50) not null
);

create sequence board_seq minvalue 1 maxvalue  99999999999999999999999 increment by 1 start with 1 cache 20 noorder nocycle;

commit;

//트리거생성 및 수정 =>주의사항: eclipse와 isqlplus에서는 dual다음의 ;(새미콜론)으로 인해서 오류와 함께 트리거가 생성된다. 관리자(/em/console) 창으로 가서 ;(새미콜론)을 붙이고 컴파일을  다시하면 트리거가 정상 동작한다.
create or replace trigger bi_board
  before insert on board
  for each row
begin
  select board_seq.nextval into :new.num from dual;
end;

commit;

alter trigger bi_board enable;

select * from user_sequences;

select * from user_triggers;

select board_seq.nextval from dual;
select board_seq.currval from dual;


drop triger bi_board;
drop sequence board_seq;

참고 사이트 : http://www.acs.ilstu.edu/docs/Oracle/server.101/b10759/statements_7004.htm

top

Trackback Address :: http://www.ssial.com/trackback/66 관련글 쓰기

  1. Chanel Outlet 2011/09/17 21:35 댓글주소 | 수정/삭제 | 댓글

    Time is what you make of it.

  2. Burberry Bags 2011/10/13 17:03 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

  3. Coach Outlet Online 2011/11/15 12:38 댓글주소 | 수정/삭제 | 댓글

    I'm happy I found this blog ! It's very good and thank you for sharing it !

  4. Coach Factory Outlet Online 2011/12/14 15:59 댓글주소 | 수정/삭제 | 댓글

    Great Coach Factory Outlet Online
    . A lot of useful information here. I’m sending it to some friends!

Write a comment