Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Create Table

  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    Earth
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create Table

    I want to create a table (for access 2000) and that the PRIMARY KEY is num auto (auto increment)

    CREATE TABLE option (id_options int PRIMARY KEY,options char(50),valeurs char(100));

    what is the syntax for it ?

    I want also a null allowed and not null allowed and this does not work

    CREATE TABLE option (id_options int PRIMARY KEY,options char(50) NOT NULL,valeurs char(100) NULL);

    thank you

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Need to use Identity......

    PHP Code:
      CREATE TABLE table_name(
        
    ColumnID         int         NOT NULL    IDENTITY(11)
      ) 

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder
    Join Date
    Feb 2004
    Location
    Earth
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    COUNTER

    I just go tit working in that way

    CREATE TABLE options (id_options COUNTER PRIMARY KEY,options char(50) NOT NULL,valeurs char(100) NOT NULL,description char(255) NULL);

    With COUNTER , but I shall try your IDENTITY

    thank you


  •  

    Posting Permissions

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