I am totally new to Informix. I'd like to know is there a way to generate
a sequence number (unique number) like oracle in Informix. Your help is
much appreciate.

Thanks in advance,
KT

11-14-2001, 06:15 AM

Re: is there a sequence number generator like oracle?

"Kiet Tran" <kiet_a_tran@yahoo.com> wrote:
>
>Hi,
>
>I am totally new to Informix. I'd like to know is there a way to generate
>a sequence number (unique number) like oracle in Informix. Your help is
>much appreciate.
>
>Thanks in advance,
>KT

Hello,
I think a serial column is what you are searching for. Just define a field
"unique_number_id" as serial and informix provides every inserted record
with a unique number. There are some further topics concerning serial fields;
just look at the documentation.

Hope I could help you.

Best wishes.

Thorsten

07-23-2003, 11:53 PM

Kalpana Pai

Re: is there a sequence number generator like oracle?

"Kiet Tran" <kiet_a_tran@yahoo.com> wrote:
>
>Hi,
>
>I am totally new to Informix. I'd like to know is there a way to generate
>a sequence number (unique number) like oracle in Informix. Your help is
>much appreciate.
>
>Thanks in advance,
>KT

Hi
You can create a column with datatype as SERIAL , which will generate a unique
number.
Example:
Create table tab1(no SERIAL not null, name varchar(255));
Unlike in oracle we have to create a Sequence and attach to table here it
is simple , just create a column with Serial datatype and make it as PRimary
key

Cheers

08-06-2003, 12:54 PM

Jim Buchalski

Re: is there a sequence number generator like oracle?

"Kalpana Pai" <Kalpanapai@hotmail.com> wrote:
>
>"Kiet Tran" <kiet_a_tran@yahoo.com> wrote:
>>
>>Hi,
>>
>>I am totally new to Informix. I'd like to know is there a way to generate
>>a sequence number (unique number) like oracle in Informix. Your help is
>>much appreciate.
>>
>>Thanks in advance,
>>KT
>
>Hi
>You can create a column with datatype as SERIAL , which will generate a
unique
>number.
>Example:
> Create table tab1(no SERIAL not null, name varchar(255));
>Unlike in oracle we have to create a Sequence and attach to table here it
>is simple , just create a column with Serial datatype and make it as PRimary
>key
>
>Cheers

Additionally, IDS 9.4 has sequence objects

See IBM Informix Guide to SQL: Syntax, Version 9.4, March 2003, Part No.
CT1SQNA, Chapter 2