• Thank you, Milvards, thank you, Chiragkhabaria 😉

    I got to the same conclusion: the script works fine for both SQL2000 and 2005 if you apply the change mentioned above by Milvards.

    The only case I found when it doesn't work is when the specified column is part of PK but I guess this is something we could live with.

    Thanks again to all for this, especially to Andy.