Unique Key in SQL Server

How To Define Unique Key in SQL Server

Questions by smita_mushrif

Showing Answers 1 - 9 of 9 Answers

create table <tablename> (field1 datatype contraint constraint-name constraint_type,fields2,field3.........)
(or)
alter table <tablename> add constraint constraint constraint_name constraint_type(fieldname)

Eg:

create table emp(eno int constraint uni1 unique,ename varchar(20)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions