.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

What are UNIQUE KEY constraint

Posted By :Karthikeyan Anbarasan     Posted Date :January 07, 2011    Points :15   Category :Sql Server 
? It enforces the uniqueness of the values in a set of columns, so no duplicate values are entered.
? The unique key constraints are used to enforce entity integrity as the primary key constraints.


You can also find related Interview Question to What are UNIQUE KEY constraint  below: 

Unique Key constraint

  
1) UNIQUE constraints are to make sure that no duplicate values are entered in specific columns that do not participate in a primary key.
2) When you are placing an unique constraint it will automatically create Unique Index to maintain the integrity.
3) Unique Allows one Null value per column where as Primary key doesn't allow null values.
4) There is no limit on having number of unqiue constraints on a table.
5) Unique Key constraint can be referenced in Foreign Key Column. (More...)

What is the .NET that allows the retrieval of data by a unique key?

  
HashTable is the .NET collection class that allows the retrieval of data by a unique key (More...)

What is Check Constraint?

  
Check constraint specifies a condition that is enforced for each row of the table on which the constraint is defined. Once constraint is defined, insert or update to the data within the tables is checked against the defined constraint
(More...)

What is the difference between RULE and Check Constraint?

  
The major difference between rule and Check is reusability. Check constraint is associated with columns in a Table. So these can't be re-used. Rules are defined with in a database and can be applied to any number of columns. (More...)

Is it possible to create Cluster Index on Unique Key Column?

  
Unique key column by default creates a non-cluster index on the column. Primary key creates cluster index on the column. The only difference is Unique key column allows only one null value. So is it possible to have cluster index on Unique key column?

The answer is YES. Though Unique key allows null value but it still maintains the uniqueness of the column. (More...)

How to create a Unique Indix?

  
Create UNIQUE INDEX Index_Name
On dbo.TABLENAME(COLUMN_NAME) (More...)

What is NOT NULL Constraint?

  
A NOT NULL Constraint enforces that the column will not accept NULL values.The NOT NULL constraint are used to enforce domain integrity as the check constraint. (More...)

What is the difference between unique and primary keys in Oracle SQL?

  
A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PrimaryKey are automatically defined as NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.
(More...)

What's the difference between a primary key and a unique key?

  
Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only. (More...)

What's the difference between a primary key and a unique key?

  
Both primary key and unique key enforces uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend