SQL Table question - Adding secondary key to table

  • I have an easy question. I need to add a secondary key to an SQL table. How would I do this?  I'm a AS400 programmer so this is work in progress for me.  I am using MS Access to import data into the table and view the SQL tables. Please help. Thanks.

  • Hello,

    What do you mean by "secondary key"?

    Do you mean another column to the table or a column to be added to an existing index?

    Thanks


    Lucky

  • Yes, I need to add a second index to the table.

  • Open your table in design view.  Click on the name of the field you want to index.  Look near the bottom and select the kind of index you want (not indexe, indexed (allow dupes), indexed (disallow dupes).  Repeat as need for as many columns as you like.

    You don't need indexes for sorting, by the way, unless you just have a ton of data.  To sort and filter you can create queries inside Access and apply your sort or filter instructions in the queries.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply