Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
So I had a table with a primary key and a bunch of different columns. Columns A, B, and C were all unsigned ints (like the primary key column) and each column had a unique constraint I dropped the...
#1: Initial revision
Why would an unique index get moved to the primary key after the underlying column is dropped?
So I had a table with a primary key and a bunch of different columns. Columns A, B, and C were all unsigned ints (like the primary key column) and had a unique constraint on each column. I dropped the A, B, and C columns, and then I got a warning that there were now duplicate unique constraints. When I checked the table structure I saw that unique indexes had been moved to the primary key column. My assumption was that dropping a column would also drop its index, why would the index be moved to the primary key?