• Create a table with an autonumber field with SQL (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Create a table with an autonumber field with SQL (2003)

    Author
    Topic
    #440677

    I am used to using DAO for this sort of thing but in this project I need to use Jet SQL.
    I am trying to make a table with an autonumber field and then set its validation rule to =1 ( so it can only ever hold one row)
    Do I start with –
    Create Table T0023([Pretender_ID] Long);

    Viewing 0 reply threads
    Author
    Replies
    • #1056314

      To create an AutoNumber field, use COUNTER or AUTOINCREMENT as field type:

      CREATE TABLE T0023 (Pretender_ID COUNTER)

      You cannot create a validation rule in SQL. You need DAO for that.

      • #1056315

        I’m trying to convince them to move to the DAO procedures I have written with your help.
        thanks again

    Viewing 0 reply threads
    Reply To: Create a table with an autonumber field with SQL (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: