C# Curator
What is an integrity constraint in SQL? Give the command for it?
By C# Curator in SQL on May 07 2010
  • Pankaj  Kumar Choudhary
    May, 2015 21

    Integrity Constraints are rules and restrictions applied on column or a table such that unwanted data can't insert into tables. This ensures the accuracy and reliability of the data in the database. we can create constraints on single or multiple columns of any table. Constraints maintain the data integrity and accuracy in the table. Constraints can classify into two types. Column Types Constraints Definitions of these types of constraints is given at time of table creation. Create Table My_Constraint ( IID int NOT NULL, Salary int CHECK(Salary>5000) )Table Types Constraints Definitions of these types constraints is given after creation of table using Alter Command.Alter Table My_Cosntraint Add constraint Check_Constraint Check(Age>50)Sql Server contain 6 types of Constraint 1. Not Null Constraint 2. Check Constraint 3. Default Constraint 4. Unique Constraint 5. Primary Constraint 6. Foreign Constraint

    • 1
  • Jamal Afroz
    May, 2013 5

    Integrity Constraints are used to apply business rules for the database tables.The constraints available in SQL are Foreign Key, Not Null, Unique, Check.Constraints can be defined in two ways 1) The constraints can be specified immediately after the column definition. This is called column-level definition. 2) The constraints can be specified after all the columns are defined. This is called table-level definition.For more please visit: http://beginner-sql-tutorial.com/sql-integrity-constraints.htm

    • 0
  • C# Curator
    May, 2010 7

    What is an integrity constraint in SQL? Give the command for it?

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS