pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sejin Oh <turbo@hanwoolbbs.com>
To: ¹Ú¹Ì·æ <mrpark@mail.tinc.co.kr>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Finding strings inside a field...
Date: Wed, 15 Jul 1998 02:34:13 -0400
Message-ID: <01bdafba$94ebc860$0201a8c0@pinga.cyberix.com> (raw)

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@mail.tinc.co.kr>
¹Þ´Â »ç¶÷: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.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




view thread (6+ messages)

Message-ID: <01bdafba$94ebc860$0201a8c0@pinga.cyberix.com>
Permalink:  ../01bdafba$94ebc860$0201a8c0@pinga.cyberix.com/
Also on:    postgresql.org/message-id/01bdafba$94ebc860$0201a8c0@pinga.cyberix.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: turbo@hanwoolbbs.com, mrpark@mail.tinc.co.kr
  Subject: Re: [SQL] Finding strings inside a field...
  In-Reply-To: <01bdafba$94ebc860$0201a8c0@pinga.cyberix.com>
  References: <01bdafba$94ebc860$0201a8c0@pinga.cyberix.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox