what is Constraint? How many types of constraints in SQL ?
Answer Posted / 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 |
Post New Answer View All Answers
What are the benefits and tasks of object explorer? : sql server management studio
what is package and it uses and how can u call a package
What is BLOCK statements in SQL?
You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
Do you know the cursor types?
Mention what are the core components of ssrs?
What are built in functions?
Do you know what are the restrictions applicable while creating views? : SQL Server Architecture
What are the different types of sub-queries?
What are different types of subquery?
Explain alternate key, candidate key and composite key in sql server?
How to test odbc dsn connection settings?
Which database stores information about replication?
Explain foreign key in sql server?