How to drop a unique constraint from table column?

SKINDER picture SKINDER · Mar 31, 2011 · Viewed 105.8k times · Source

I have a table 'users' with 'login' column defined as:

[login] VARCHAR(50) UNIQUE NOT NULL

Now I want to remove this unique constraint/index using SQL script. I found its name UQ_users_7D78A4E7 in my local database but I suppose it has a different name on another database.

What is the best way to drop this unique constraint? Or at least any...

Thanks.

Answer

Avadhesh picture Avadhesh · Mar 31, 2011
ALTER TABLE users
DROP CONSTRAINT 'constraints_name'