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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to remove column Uniqueness

Status
Not open for further replies.

mhamilton3

Programmer
Oct 31, 2001
129
I have a column that is listed as Unique and I need to remove that. I can not figure out how to do it with without creating a new column, copying the old data in, deleting the old, and renaming the new. Any suggestions?
 
if a column is marked as unique, there is a unique index created, so just drop that index

e.g.:
ATLER TABLE tablename DROP INDEX indexname

where indexname is often equal to the column name
 
Thank you, that did it. FYI: The Alter table syntax did not work, but DROP INDEX Indexname on tablename did. I'm good to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top