Write a SQL query to make a column as unique?



Write a SQL query to make a column as unique?..

Answer / Paritosh Vishnoi

To make a column unique in SQL Server, you need to create a UNIQUE constraint. Here's an example: ALTER TABLE Employees ADD CONSTRAINT uq_employeeid UNIQUE (EmployeeID)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication

1 Answers  


How do you test your database? : sql server database administration

1 Answers  


What is the STUFF function and how does it differ from the REPLACE function?

2 Answers  


What is the difference between a function and a trigger?

1 Answers  


What is the difference between clustered index and primary key?

1 Answers  


What do you mean by sql server 2005 express management tools?

1 Answers  


How to count groups returned with the group by clause in ms sql server?

1 Answers  


how we can use a database with php.

2 Answers   HCL, IT Solution,


Why we need sql server?

1 Answers  


Explain about merge replications?

1 Answers  


What are the authentication modes in sql server? How can it be changed?

1 Answers  


what are defaults? : Sql server database administration

1 Answers  


Categories