what is Constraint? How many types of constraints in SQL ?
Answers were Sorted based on User's Feedback
Answer / vinod
Constraints are used to restrict the insertion of unwanted data.
Using constraints you can maintain data integrity by preventing invalid data being entered.
Constraints are Five type
Primary key
Unique Key
Foreign Key
Not Null
Check
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mohan
Constraint is nothing but set of rules or restrictions on a column,in order to achieve business requirements.
There are five types of constraints,
they are
1.primary key
2.unique key
3.not null
4.check
5.foreign key
These constraints also called data integrity constraints.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / awadhesh
You can place constraints to limit the type of data that can go into a table. Such constraints can be specified when the table when the table is first created via the CREATE TABLE statement, or after the table is already created via the ALTER TABLE statement.
Common types of constraints include the following:
NOT NULL Constraint: Ensures that a column cannot have NULL value.
DEFAULT Constraint: Provides a default value for a column when none is specified.
UNIQUE Constraint: Ensures that all values in a column are different.
CHECK Constraint: Makes sure that all values in a column satisfy certain criteria.
Primary Key Constraint: Used to uniquely identify a row in the table.
Foreign Key Constraint: Used to ensure referential integrity of the data.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / pandia 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 column
(s). Constraints are used to enforce the data integrity.
This ensures the accuracy and reliability of the data in
the database
CONSTRAINT=The threat or use of force to prevent, restrict,
or dictate the action or thought of others.
there are 7 types of constraints are there and they are
grouped in to 4 types. They are
TYPES GROUP
1.DEFAULT = DOMAIN INTEGRITY
2.NOT NULL = DOMAIN INTEGRITY
3.CHECK = DOMAIN INTEGRITY
4.FOREIGN KEY = REFERENTIAL INTEGRITY
5.UNIQUE KEY = ENTITY INTEGRITY
6.PRIMARY KEY = DOMAIN INTEGRITY
7.RULE = USER DEFINED INTEGRITY
| Is This Answer Correct ? | 8 Yes | 10 No |
Answer / ns
constraints are like an a right or any event which can we
apply on our table or column, or its an rule of integrity
there is an types of constraint:-
1.primary key
2.foreign key
3.unique
4.check
5.default
6.not null
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / magesh manavalan
Types Of Constraints:
* Primary Key
* Foreign Key
* Default
* Unique Key
* Not NULL
* Check
| Is This Answer Correct ? | 0 Yes | 2 No |
What is 3nf normalization form?
Explain the difference between cross join and full outer join?
What is rolap and its advantage? : sql server analysis services, ssas
What is apply operator in sql?
how to do partition in sqlserver
What is excution Plan in sql server
1 Answers CarrizalSoft Technologies, TCS,
Is it important for a database administrator to understand the operating system and file access?
Explain the architecture of SQL Server?
What is cube dimension? : sql server analysis services, ssas
What are various aggregate functions that are available?
Is there any difference between the primary key and unique key?
What does null mean?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)