Use IDENTITY (1000, 1)

1000 is the start value and 1 is the increment.  You need to supply both.

-----Original Message-----
From: Andy and Kim Mills [mailto:[EMAIL PROTECTED] 
Sent: 25 January 2005 3:09
To: [email protected]
Subject: [ASP] Create Table With Identity Column



Hello Guys:

I want to create this table, but want the IDENTITY to start at a number say
(1000).  How do I create it and get the IDENTITY to start at a predifned
number?  I tried IDENTITY(1000) and this didn't work.

CREATE TABLE #tempSamples (
        i_SamplesNewID int IDENTITY NOT NULL ,
        i_SamplesOldID int NOT NULL ,
        fk_Item int NULL ,
        s_Caption Varchar (8000) NULL 
        ) ON [PRIMARY]

Thanks
Andy



---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 


The contents of this email and any attachments are sent for the personal 
attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited



---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to