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 is the Main Difference between ACCESS and SQL SERVER?
What does null mean?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
what is create database syntax? : Sql server database administration
Define a cross join?
What is data modeling and Reterminal integrity?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?
If a stored procedure is taking a table data type, how it looks?
What are scalar functions?
What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?
what is sql server? : Sql server database administration
How can you set the threshold at which sql server will generate keysets asynchronously?
What is the stored procedure?
How to identify current user in ssrs report?
How to loop through result set objects using odbc_fetch_row()?