PC Review


Reply
Thread Tools Rate Thread

auto incrementing field

 
 
ray well
Guest
Posts: n/a
 
      10th Feb 2005
hi

i need to create a autoincrementing primary key field in a access database
thru a sql command, (that kind of field is called a long integer in access,
and it autoincrements when a new record is added)

the following gets the field type created, but it doesn't auto increment.

CREATE TABLE tblCustomers ([Last Name] TEXT(5) NOT NULL, CustomerID UniqueID
INTEGER NOT NULL PRIMARY KEY UNIQUE)

what would be the word to make it auto increment?

thanks

ray



 
Reply With Quote
 
 
 
 
Italo Silveira
Guest
Posts: n/a
 
      11th Feb 2005
CREATE TABLE MyTable(ColName int identity (1,1) PRIMARY KEY)

Good luck,
Italo


"ray well" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi
>
> i need to create a autoincrementing primary key field in a access database
> thru a sql command, (that kind of field is called a long integer in
> access,
> and it autoincrements when a new record is added)
>
> the following gets the field type created, but it doesn't auto increment.
>
> CREATE TABLE tblCustomers ([Last Name] TEXT(5) NOT NULL, CustomerID
> UniqueID
> INTEGER NOT NULL PRIMARY KEY UNIQUE)
>
> what would be the word to make it auto increment?
>
> thanks
>
> ray
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is It Possible To Generate An Auto-Incrementing Field? mcl Microsoft Access Queries 3 3rd Oct 2006 09:52 PM
Scary auto-incrementing number field Curmudgeon Microsoft Access 7 31st Aug 2005 01:41 AM
Form field names auto-incrementing Joanne Microsoft Frontpage 2 8th Dec 2004 10:07 AM
Re: how do i define and inplement an auto incrementing field TF Microsoft Word New Users 0 27th Jul 2004 06:37 PM
Auto incrementing a record counting field Steve Microsoft Access 1 28th Aug 2003 02:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:38 PM.