CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Posts
    1

    SQL Command, How to Create Table with autonumber column?

    Does anyone know how to use SQL command to Create/Alter Table with autonumber column? I was looking for field data type for Access DataBase from msdn online help, and wondering there is no auto number data type.

    My SQL command is like:
    CREATE TABLE pTable(Column1 integer)

    and Column1 field will be long integer data type, how can I make it as autonumber data type?

    Thanks in advance!!

    Wenjung Lin





  2. #2
    Join Date
    Feb 2001
    Location
    teh INTARWEB
    Posts
    542

    Re: SQL Command, How to Create Table with autonumber column?


    Check the first syntax example given at the following page:

    http://support.microsoft.com/default...;EN-US;q209037


    Manish
    http://www.manishmalik.com

    Discuss it all at the Developer Forum : http://www.codeguru.com/cgi-bin/bbs/...Board=devforum ...

  3. #3
    Join Date
    Feb 2002
    Posts
    5

    Re: SQL Command, How to Create Table with autonumber column?

    you can use idenitity eg

    create table bob
    (
    id integer identity(1,1) not null,




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured