Self incrementing number column & datatype Number(22)

  • I have to design a table having column name id which is of integer datatype and having self incrementing number ,so what will be the create table commnand?

    which datatype is should i take which is equivalent to number datatype having size is 22 in sqlserver 2000 

     

  • have a look at the Identity keyword in BOL for the first part of your question.

    i don't understand the second part

    cheers

    dbgeezer

  • Hi R.B!

    To create the table use:

    CREATE TABLE [dbo].[MyTable] (

         [id] int not null identity(1,1) )

    I don't quite understand your question about datatype. Have a look at this page from Books Online. Might help you.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_04_82ic.asp

    Gook luck.


    robbac
    ___the truth is out there___

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply