Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I creat a auto increment for my key field

0 views
Skip to first unread message

tedpottel

unread,
Dec 19, 2009, 7:56:21 PM12/19/09
to
Hi,
How can I make a column auto increment ?
-Ted

SetonSoftware

unread,
Dec 19, 2009, 8:12:22 PM12/19/09
to

B.Edwards

unread,
Dec 19, 2009, 9:02:58 PM12/19/09
to
CREATE TABLE Customer
(CustomerKey int IDENTITY(1,1) CONSTRAINT PK_Customer PRIMARY KEY NOT NULL,
SurName varchar(40),
GivenName varchar(50))


"tedpottel" <tedp...@gmail.com> wrote in message
news:46f90526-34c3-49dd...@u7g2000yqm.googlegroups.com...

tedpottel

unread,
Dec 29, 2009, 8:29:13 PM12/29/09
to
On Dec 19, 8:12 pm, SetonSoftware <seton.softw...@verizon.net> wrote:
> On Dec 19, 7:56 pm, tedpottel <tedpot...@gmail.com> wrote:
>
> > Hi,
> > How can I make a column auto increment  ?
> > -Ted
>
> This should explain everything:
>
> http://blog.sqlauthority.com/2009/05/03/sql-server-add-or-remove-iden...
>
> Hope this helps
>
> Carl

Thank you,
-Ted

tedpottel

unread,
Dec 29, 2009, 8:29:40 PM12/29/09
to
On Dec 19, 9:02 pm, "B.Edwards" <Bedwa...@nospam.net> wrote:
> CREATE TABLE Customer
> (CustomerKey int IDENTITY(1,1) CONSTRAINT PK_Customer PRIMARY KEY NOT NULL,
>  SurName varchar(40),
> GivenName varchar(50))
>
> "tedpottel" <tedpot...@gmail.com> wrote in message
>
> news:46f90526-34c3-49dd...@u7g2000yqm.googlegroups.com...
>
>
> -Thank you,
-Ted

> > Hi,
> > How can I make a column auto increment  ?
> > -Ted- Hide quoted text -
>
> - Show quoted text -

0 new messages