what is Constraint? How many types of constraints in SQL ?

Answers were Sorted based on User's Feedback



what is Constraint? How many types of constraints in SQL ?..

Answer / pramod tiwari,mba-it,lpu

SQL Constraints-
Constraints are used to limit the type of data that can go
into a table.

Constraints can be specified when a table is created (with
the CREATE TABLE statement) or after the table is created
(with the ALTER TABLE statement).

We will focus on the following constraints:

•NOT NULL
•UNIQUE
•PRIMARY KEY
•FOREIGN KEY
•CHECK
•DEFAULT

Is This Answer Correct ?    9 Yes 1 No

what is Constraint? How many types of constraints in SQL ?..

Answer / nambi rajan

A constraint is a property assigned to a column or the set
of columns in a table that prevents certain types of
inconsistent data values from being placed in the columns.

There are 4 Types of Constraints.
• Entity Integrity - Primary and Unique
• Domain Integrity - Default, Check and Not Null
• Referential integrity – Foreign Key
• User-Defined Integrity - enforces some specific
business rules that do not fall into entity, domain, or
referential integrity categories

Is This Answer Correct ?    13 Yes 7 No

what is Constraint? How many types of constraints in SQL ?..

Answer / rohit nanda

A constraint is a property assigned to a column or the set
of columns in a table that prevents certain types of
inconsistent data values from being placed in the columns.

There are 4 Types of Constraints.
• Entity Integrity - Primary and Unique
• Domain Integrity - Default, Check and Not Null
• Referential integrity – Foreign Key
• User-Defined Integrity - enforces some specific

Is This Answer Correct ?    7 Yes 3 No

what is Constraint? How many types of constraints in SQL ?..

Answer / ramesh.n

constraints are the restrictions or limitations that are
being imposed on the columns of a table to validate the data
either for insertion or updation constraints can be imposed
either during the process of table creation of a level.

There are 8 types of constraints
1.unique
2.Not null
3.Primary key
4.Check
5.Default
6.Foreign key
7.composite primary key
8.composite unique key

Is This Answer Correct ?    6 Yes 2 No

what is Constraint? How many types of constraints in SQL ?..

Answer / seshu

constraint is a mechanism it is used to prevent the invalid
data entry in to the table is called constraint.
constraints are 5 types they are,

1 Primary Key Constraint
2 Foreign Key Constraint
3 Unique Constraint
4 Not Null Constraint
5 Check Constraint

Is This Answer Correct ?    5 Yes 1 No

what is Constraint? How many types of constraints in SQL ?..

Answer / sivanagireddy.k

constraints nothing but condition on column in the table by using constraint checking process or validation pprocess has been done.

constraints are 6 tyes
1.unique
2.Not null
3.Primary key
4.Check
5.Default
6.Foreign key

types of level in constraints

column level
table level

send ur queries to this mail id rsivanagireddy@gmail.com

Is This Answer Correct ?    4 Yes 0 No

what is Constraint? How many types of constraints in SQL ?..

Answer / shelly

Constraints are used to limit the type of data that goes
into a table.Constraints can be declared at the time of
creating a table or by altering the already created table.

1)Not Null
2)Unique
3)Primary Key
4)Check
5)References
6)Default

Is This Answer Correct ?    2 Yes 0 No

what is Constraint? How many types of constraints in SQL ?..

Answer / manoj kumar

Contraint is a provision to limit or enforce the data in
the sql tables. It is of five types:-
1 Primary Key Constraint
2 Foreign Key Constraint
3 Unique Constraint
4 Not Null Constraint
5 Check Constraint

Is This Answer Correct ?    7 Yes 6 No

what is Constraint? How many types of constraints in SQL ?..

Answer / krishna

constraints are use to maintain the relation between the two tables. sql contains the 5 types of constraints
1.primary key
2.foreign key
3.unique key
4.Not null
5.check

Is This Answer Correct ?    2 Yes 1 No

what is Constraint? How many types of constraints in SQL ?..

Answer / m arunachalam

Constraints are used to limit the type of data that can go
into a table.

Constraints can be specified when a table is created (with
the CREATE TABLE statement) or after the table is created
(with the ALTER TABLE statement).

We will focus on the following constraints:

NOT NULL
UNIQUE
PRIMARY KEY
FOREIGN KEY
CHECK
DEFAULT

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are the different index configurations a table can have?

0 Answers  


Is it possible to replicate data from sql server to oracle? : sql server replication

0 Answers  


Which virtual table does a trigger use?

8 Answers   TCS,


What does REVERT do in SQL Server 2005?

0 Answers   HCL,


What are window functions in sql server?

0 Answers  






There is table like Events...in that name ,startdate ,enddate,location are the column names write a stored Procedure for this table to get events by Months "GetEventsByMonths"

2 Answers  


please differentiate between delete and truncate?

0 Answers  


What are the results of running this script?

0 Answers  


How do you troubleshoot errors in a SQL Server Agent Job?

0 Answers  


hw you create table in sql using existing table and variable should be in specific order given ex : in old table empid empname empsal empage empbirthdate empaddrs like is there in new table we need it as EX: exmpname empage empaddrs empid empbirthdate like we want hw we create this as a table not view or nt reporting

2 Answers  


what is procedure in sql?

2 Answers   Millennium, SQL,


What would be the Expected Salary For SQL Server Developer for 3 years exp. as per indian market?

7 Answers  


Categories