Re: [SQL] Finding strings inside a field...

From: "Sejin Oh" <turbo(at)hanwoolbbs(dot)com>
To: 박미룡 <mrpark(at)mail(dot)tinc(dot)co(dot)kr>, <pgsql-sql(at)postgreSQL(dot)org>
Subject: Re: [SQL] Finding strings inside a field...
Date: 1998-07-15 06:34:13
Message-ID: 01bdafba$94ebc860$0201a8c0@pinga.cyberix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

create sequence table. and use nextval('sequence_name') when inserting.

eg:
create sequence autocounter;
create table customer (customerid int4 not null, name varchar(50) );
insert into customer values(nextval('autocounter),'Ronaldo');

or

create sequence autocounter;
create table customer (customerid int4 DEFAULT nextval('autocounter') not
null, name varchar(50) );
when you INSERT, just ignore customerid field.

ps: man create_sequence

hope this helped.
:)

-----원본 메시지-----
보낸 사람: 박미룡 <mrpark(at)mail(dot)tinc(dot)co(dot)kr>
받는 사람: pgsql-sql(at)postgreSQL(dot)org <pgsql-sql(at)postgreSQL(dot)org>
날짜: Tuesday, July 14, 1998 9:48 PM
제목: Re: [SQL] Finding strings inside a field...

>How can i make the field auto incremental ?
>
>It is in the mysql, but That's not in pgsql.
>
>How can I ?
>
>Please give me a info.
>Thank you

Browse pgsql-sql by date

  From Date Subject
Next Message Brook Milligan 1998-07-15 17:21:35 limitations of views?
Previous Message Zsolt Varga 1998-07-15 06:27:14 Re: [SQL] Typecasting in SQL functions