Hi all.
I have a heap that has a non-clustered index and it is a primary key. I need to convert it to a clustered one. The problem is that it is referenced by a foreign key from another table. For now, I am doing 4 steps:
1. Drop FK.
2. Drop PK.
3. Recreate PK (as clustered)
4. Recreate FK
But is there a more elegant solution? I tried to manipulate with drop_existing, etc, but so far nothing like this works. What I need is only to change my PK to clustered.
Thanks.