Monday , March 1 2021

What is Constraint and SQL Server Constraint Types(TSQL)

 

Constaint allows us to set specific rules for data in a table. For example; to make sure that the data in a column is between certain values.

A constraint can affect only a column, but it can also affect the entire table. We can define Constraints in the stage of creating the table or after creating the table.

Here are the most common types of constraint used in SQL Server:

NOT NULL ConstraintNOT NULL Constraint in SQL Server(TSQL)
DEFAULT ConstraintHow To Create Default Constraint On SQL Server
UNIQUE ConstraintWhat is Unique Constraint
Primary Key and Foreign KeyWhat is Primary Key and Foreign Key
CHECK ConstraintHow To Create CHECK CONSTRAINT
INDEXIndex Concept and Performance Effect on SQL Server

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *