Results 1 to 3 of 3
  1. #1
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67

    Creating index

    With SQL, I'm able to create a new table. In the same SQL, can indexes be created? If yes, what is the proper syntax? I've tried
    [My Field1] text (255) CONSTRAINT[My Field1x], [My Field2] text (255) CONSTRAINT[My Field2x].

    If no, I was able to create my index with SQL Create Index [My Filed1] on TableName [My Field1x] but was only able to create a single index. Can multiple indexes be created within a single SQL statement or does each index need it's own SQL?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    there's really no need to do it in sql when you can just click design , put in the fields then save.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,118
    Yes you can create indexes when creating the table, have a look at this link:
    https://www.oreilly.com/library/view...7/ch01s15.html
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Id is not an index in this table
    By DMT Dave in forum Access
    Replies: 2
    Last Post: 03-30-2020, 12:56 AM
  2. 'id' is not an index in this table
    By DManders in forum Access
    Replies: 4
    Last Post: 08-18-2015, 04:17 AM
  3. Replies: 5
    Last Post: 04-05-2014, 08:52 PM
  4. Using Combo Box as Index
    By tgwacker in forum Forms
    Replies: 1
    Last Post: 11-19-2013, 08:58 PM
  5. Creating a unique index on two fields
    By Paul H in forum Database Design
    Replies: 3
    Last Post: 11-03-2011, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums