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

Top 5 Contributors of the Month
david stephan
Gaurav Pal

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

Define Constraints in SQL SERVER

Posted By :sriram     Posted Date :October 27, 2011    Points :40   Category :Sql Server 
Constraints Provide the Mechanism provide integrity in the data base to create a table to check some conditions.

There are Three type of constraints in sql server

1) Domain Integtity Constraint(not null,check)
2) Entity Integrity Constrinnt( Primary key ,Unique Key)
3) Referential Integrity Constraint(Parent table,Child Table Relationship)..

hope this will Hellp..
Let me know any Queries


You can also find related Interview Question to Define Constraints in SQL SERVER  below: 

Explain Constraints in SQL SERVER?

Data integrity is an important feature in SQL Server. When used properly, it ensures that data is accurate, correct, and valid. It also acts as a trap for otherwise undetectable bugs within applications.


A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should
have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity.

UNIQUE constraint:

A UNIQUE constraint 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

FOREIGN KEY constraint:

A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign
keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.

CHECK constraint:

A CHECK constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity. A NOT NULL constraint enforces that the column will not accept null values. The not null constraints are used to enforce domain integrity, as the check constraints. (More...)

What are constraints in SQL Server?

Constraints enforce the data integrity to the database and protect columns of the table from unwanted values. NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY are the types of contraints define in SQL Server.


Which of the following requirements define the constraints on the system and the conditions under which the system must be developed?

1, Non-functional requirements
2, Functional requirements
3, Data requirements m
4, User requirements

Answer : 1 (More...)

Define linked server?

It is a concept that allow us to add other sql server to a group and can query both using sql statements. (More...)

Database:Define SQL server agent


Its main aim is to ease the implementation of task for the dba with scheduleing of the jobs and scripts. (More...)

Database Concurrency in Sql Server.

When two or more user try to update same type of data in a table then Database Concurrency helps in this situation.

There are 2 types of Database Concurrency

Pessimistic: When one user try to change the data with pessimistic concurrency then a lock is placed on the data in a table so that another user cannot change data. when one user finishes then other user can able to change.

Optimistic: When two user works on the same data in a table and one change that data first then second user cannot change that same data becasue the which he have using is allready changed so he cannot do the change becasue change apply to another data that is changed by first user. (More...)

Is it true that COM objects no longer need to be registered on the server?

Yes and No. Legacy COM objects still need to be registered on the server before they can be used. COM developed using the new .NET Framework will not need to be registered. Developers will be able to auto-register these objects just by placing them in the 'bin' folder of the application. (More...)

What are server controls?

ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes. (More...)

Which authentication mode lets you use both SQL Server logins and Windows logins?

Mixed Mode authentication mode lets you use both SQL Server logins and Windows logins? (More...)

What are the types of indexes available with SQL Server?

There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered. (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