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.

  • You're asking how to add another index?  The easiest way to do this for a newbie is via SQL Enterprise Manager.  Right Click on the proper table choose all tasks, manage indexes.  From there click New choose the appropriate options and you're done.

    Or you could do it with the Appropriate DDL.  Here's a link to the TSQL reference for Indices. 

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create_64l4.asp

     

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Thanks Luke. I ended up concatenating two fields together and creating a new field and then using that one field as the main key or idex. Programming short cuts 101. Thank you everyone.  Love this web site tho. Later.

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

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