Createing a new Index in SQL when current records don't meet that index
Posted
by Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2010-03-12T13:32:24Z
Indexed on
2010/03/12
13:37 UTC
Read the original article
Hit count: 522
Hey all-
I'd like to add an index to a table that already contains data. I know that there a few records currently in the table that are not unique with this new index. Clearly, MySQL won't let me add the index until all of them are.
I need a query to identify the rows which currently have the same index. I can then delete or modify these rows as necessary. The new index contains 6 fields.
Thanks-
Jonathan
© Stack Overflow or respective owner