Cameron Patterson
SSC Journeyman
Points: 90
More actions
June 13, 2006 at 10:28 am
#366380
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.
JeffB
Hall of Fame
Points: 3541
June 14, 2006 at 8:19 am
#643652
If by key you mean unique index, then the following will work:
create table test (col1 int primary key, col2 int)
create unique index ux_test_col2 on test(col2)
June 14, 2006 at 10:22 am
#643709
Cameron,
Don't cross post your question to different forums.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply