Skip site navigation (1) Skip section navigation (2)

autoincrement question

From: Jack Albright <jack(at)mobiusnm(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: autoincrement question
Date: 2008-01-07 20:57:50
Message-ID: 4ED5AEA8-A4A8-4CFF-A23E-A36A3FD506FC@mobiusnm.com (view raw or flat)
Thread:
Lists: pgsql-novice
I'm new to the list and new to postgreSQL.
I usually work in mySQL.
I'm using NaviCat to manipulate my postgreSQL db.

QUESTION:
What is the best way for a novice like me to  make my  primary key ID  
column   auto-increment?  It is a basic integer column.

  Also, do I need to set a default value  for my primary keys?

In MySQL (using phpMyAdmin) it's a simple matter of checking a  
checkbox. What is the recommended way to do this in postgres?

Thanks,

Jack Albright
jack(at)mobiusnm(dot)com





Responses

pgsql-novice by date

Next:From: Sean DavisDate: 2008-01-07 21:12:36
Subject: Re: autoincrement question
Previous:From: Andreas KretschmerDate: 2008-01-06 10:09:49
Subject: Re: Command line output - How to output values only?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group