Can we create multicolumn unique indexes on MS access databases?

后端 未结 4 1848
走了就别回头了
走了就别回头了 2020-12-01 10:53

We\'d like to prevent record duplication in our MS access database using a multicolumn unique index. Because of how the data is sent (via network), duplicate data is sometim

相关标签:
4条回答
  • 2020-12-01 11:14

    It will serve as Unique key in Ms Access 2007/2010

    0 讨论(0)
  • 2020-12-01 11:18

    Turns out you can create a multi-column unique index on an MS access database, but it's a little crazy if you want to do this via the GUI. There's also a limitation; you can only use 10 columns per index.

    Anyway, here's how you create a multi-column unique index on an MS access database.

    1. Open the table in design mode, and Design, select Indexes.
    2. Create a new row and enter a value in the Index Name cell,
    3. Choose the first column from the drop down menu.
    4. Add a new row and leave the Index Name cell blank.
    5. Choose the second column, and so on.

    Here's what it should look like:

    0 讨论(0)
  • 2020-12-01 11:19

    We can make multi data to be unique data without set them as primary key.

    (Note: only 1 data in the table can be primary key)

    Step to set the data value as unique data (for MS ACCESS 2007 - 2010)

    1. Open selected table in Design View
    2. Click (Highlight) the specific column/attribute that you wish to set as unique
    3. At the bottom of the table you will see "Index Properties" for that specific column
    4. Find "Indexed" column, currently the data in Indexed text box is "No", change the data by click at the end of text box, choose "Yes(No Duplicates)"

    Really hopes this methods can helps all of you! :)

    0 讨论(0)
  • 2020-12-01 11:20

    Open the table in design view in MS Access, select the three columns that you want to make into the unique index, and then click the little key on the toolbar. You cannot have null values in a primary key (set).

    0 讨论(0)
提交回复
热议问题