Re: [SQL] Auto Increment

2001-10-24 Thread Joe Barrero
create table mytable ( myfield serial primary key, myotherfield integer); Using the SERIAL data type automatically creates the sequence and default statements for you. -Original Message- From: Mayuresh Kadu [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 2:36 AM To: [EMAIL PROT

Re: [SQL] Auto Increment

2001-10-23 Thread Josh Berkus
Mayuresh, First, beginner's questions belong on the PGSQL-NOVICE list. > could anyone tell me how to make a primary key to AUTO INCREMENT. The > document is not exactly very explainatory about it :) No, it is quite clear. See: http://www.postgresql.org/idocs/index.php?datatype.html section 3.1

Re: [SQL] Auto Increment

2001-10-23 Thread Cory Wright
Try using SERIAL: CREATE TABLE mytable ( MYID SERIAL, name TEXT ); It will auto create the sequences for you. Cory Wright [EMAIL PROTECTED] http://www.southcarrollton.net/ On Mon, 22 Oct 2001, Arian Prins wrote: > On Mon, 22 Oct 2001 12:06:21 +0530, "Mayuresh Kadu" > <[EMAIL PROTECTED]>

Re: [SQL] Auto Increment

2001-10-23 Thread Arian Prins
On Mon, 22 Oct 2001 12:06:21 +0530, "Mayuresh Kadu" <[EMAIL PROTECTED]> wrote: >hi all, > >could anyone tell me how to make a primary key to AUTO INCREMENT. The >document is not exactly very explainatory about it :) > >Thankx in advance ... > > > >Mayuresh > > Try first creating a sequence and t

Re: [SQL] AUTO INCREMENT

2000-06-10 Thread Lucile Dirry
Check manual/user for details on 'sequences'. Good luck. -Message d'origine- De : [EMAIL PROTECTED] <[EMAIL PROTECTED]> À : GANESH KUMAR <[EMAIL PROTECTED]> Cc : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : samedi 10 juin 2000 12:12 Objet : Re: [SQL] AUTO

Re: [SQL] AUTO INCREMENT

2000-06-10 Thread M . Mazurek
On Sat, 10 Jun 2000, GANESH KUMAR wrote: > i am searching for > autoincrement in table > > in table employee > i want give empno as autoincrement create table xyz (id serial primary key); check documentation what it really is:). Marcin Mazurek -- administrator MULTINET SA o/Poznan http://ww