Re: Creating a table - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Creating a table
Date
Msg-id 200111120354.fAC3siE13775@candle.pha.pa.us
Whole thread Raw
In response to Creating a table  ("Reuben Olson" <reuben.olson@clear.net.nz>)
List pgsql-general
> Hi there
>
> I am converting a mySQL database to postgresql database and I
> was wondering if there was any auto increment function like
> there is in mysql or di I need to use a sequence or something...

Sure, sequences.  If you define a column as type SERIAL you get a
sequence default on the column.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Creating a table
Next
From: Travis Bauer
Date:
Subject: [general] Permissions