Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about adding a column to a key

Status
Not open for further replies.

gbraden

MIS
Jan 24, 2002
129
US
I have a table with 5 columns, and three of the columns comprise a unique key. I need to add a fourth column to that key, but I can't drop the table data.

I cannot use Enterprise Manager in this environment, so I am using an ASP page with a SQL window to run my commands.

Is there an easier way than saving the table data to a temp, dropping the table, recreating the table with the 4th column and moving the data back in?



[noevil]
Glen Braden
 
I figured it out.

I identified the index, using a script I found on this forum (Aug 06).

Then I did an alter table drop index. with another alter table specifying the constraint and fields.

Am I allowed to give myself a star?

[noevil]
Glen Braden
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top