Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: bind sequences to columns

Re: bind sequences to columns

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 16 Oct 2002 11:40:28 -0700
Message-ID: <130ba93a.0210161040.398838ff@posting.google.com>


Yes, it would be nice to have something like that. But sequence.nextval can only be used within a SQL statement and I don't think you can put a SQL behind the default clause of a table. I tried to find a more elegant solution to convert SQL server identity column to no avail. The application we converted from SQL server ended up with a bunch of sequences and triggers. Not difficult, but I would rather not see them. It was 8i. I don't think it is any differnet with 9i, since I noticed the 9i version of Migration Work Bench still uses the same approach to convert identity column.

Hans Erik Busk <tbf_at_cn.stam.dk> wrote in message news:<j4lqqu414brmgtcl4hctv29vojuqlg09g5_at_4ax.com>...
> On 14 Oct 2002 12:27:53 -0700, JusungYang_at_yahoo.com (Jusung Yang)
> wrote:
>
> >Maybe you are looking for something like the "identity" functionality
> >in SQL server, where the value of a column is automatically
> >incremented when a new row is inserted? You will have to use trigger
> >and sequence for that with ORACLE.
> >
> >
> >- Jusung Yang
> >
> >
> >thomas.hiller_at_warema.de (Thomas) wrote in message news:<6e366956.0210140406.797e4d4c_at_posting.google.com>...
> >> Hi *,
> >>
> >> is there any possibility to bind a sequence to a specific column of a
> >> table. I know that Oracle 7.3 does not provide any function like that,
> >> but how about Oracle 9i (9.2)
> >>
> >> regard
> >> thomas
>
> It would be nice if a column could have a sequence.next_val as the
> default value.
>
> Hans Erik Busk
> tbf_at_cn.stam.dk
Received on Wed Oct 16 2002 - 13:40:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US