PL/SQL and Default Parameters - Page 2
DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: PL/SQL and Default Parameters

  1. #11
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Trigger is your only option in Oracle.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  2. #12
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    You'd use a sequence, rather than a "counter table" ... something like ...

    Code:
    create sequence my_seq;
    
    Create or Replace Trigger
    	BIR_MY_TABLE
    Before Insert On MY_TABLE
    For Each Row
    Begin
    Select	my_seq.nextval
    Into	:new.MY_TABLE#
    From Dual;
    End;
    /
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width