what is Constraint? How many types of constraints in SQL ?
Answer Posted / shreevats
Constraints are the conditions which allows to restrict the invalid or inconsistent data in the tables.
Types of Constraints
1.Not null:Not null make any column as mandatory and it will not allows the null values.
2.Unique:It will not allows duplicate values.
3.Primary Key:A PK is used to identify a record uniquely in a table.
PK=UNIQUE+NOT NULL
4.Foreign Key or Referential Integrity constraint
:It creates the relationship between any two tables.
5.Check: It is used for enforcing business validation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What should be the fill factor for indexes created on tables? : sql server database administration
What is federation member?
What is difference in performance between insert top (n) into table and using top with insert?
How do you delete a data source?
Explain Geometry datatype in sql server 2008 with example
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
How we can refresh the view?
What are the types of ssrs?
How to optimize stored procedure optimization?
what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration
What is single-user mode?
How can you ensure that the database and sql server based application perform well?
What is data compression? : sql server database administration
What is the size of transaction log file?
What do you understand by triggers and mention the different types of it?