Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
About Us
986
Questions
785
Answers
Interview Preparation mode
beta
Funny Facebook Status
Enter your email address
All categories
SQL Server Interview Questions and Answers
(197)
SSIS Interview Questions and Answers
(54)
SSRS Interview Questions and Answers
(9)
SSAS Interview Questions and Answers
(29)
.NET Interview Questions and Answers
(186)
Oracle Interview Questions and Answers
(122)
Java Interview Questions and Answers
(32)
UNIX Interview Questions and Answers
(47)
Networking Interview Questions and Answers
(17)
MySQL Interview Questions and Answers
(30)
HR Interview Questions and Answers
(237)
General Interview Questions and Answers
(9)
Other Interview Questions and Answers
(8)
Job Openings
(3)
Greenplum Database Interview Questions and Answers
(5)
What is SQL Constraints?
+1
vote
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
siva
(
10,720
points)
–
edited
1 year
ago
by
R
sql-server-interview-question
database
dbms
constraints
1 Answer
Nice?
Vote!
Constraints are the rules enforced on data columns on table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Contraints could be column level or table level. Column level constraints are applied only to one column where as table level constraints are applied to the whole table.
Following are commonly used constraints available in SQL:
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.
PRIMARY Key: Uniquely identified each rows/records in a database table.
FOREIGN Key: Uniquely identified a rows/records in any another database table.
CHECK Constraint: Ensures that all values in a column satisfy certain conditions.
INDEX: Use to create and retrieve data from the database very quickly.
answered
1 year
ago
by
R
(
19,530
points)
is Index a constraint?
—
1 year
ago
by
anonymous
Related questions
Nice?
Vote!
Add
Ans!
What is difference between DBMS and RDBMS?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
Pandi
(
540
points)
sql-server-interview-question
database
rdbms
dbms
+1
vote
1
answer
What is extension and intension?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
R
(
19,530
points)
sql-server-interview-question
database
dbms
rdbms
Nice?
Vote!
1
answer
What is Data Integrity?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
siva
(
10,720
points)
sql-server-interview-question
database
dbms
+1
vote
2
answers
What is NULL value?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
siva
(
10,720
points)
sql-server-interview-question
database
dbms
Nice?
Vote!
1
answer
What is column?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
siva
(
10,720
points)
sql-server-interview-question
database
dbms
table
t-sql