what is Constraint? How many types of constraints in SQL ?

Answer Posted / pramod tiwari,mba-it,lpu

SQL Constraints-
Constraints are used to limit the type of data that can go
into a table.

Constraints can be specified when a table is created (with
the CREATE TABLE statement) or after the table is created
(with the ALTER TABLE statement).

We will focus on the following constraints:

•NOT NULL
•UNIQUE
•PRIMARY KEY
•FOREIGN KEY
•CHECK
•DEFAULT

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where can you find the error log information? : sql server database administration

567


Do you know what is a linked server in sql server?

553


How do you drop an index?

505


What is precedence constraint?

546


What is buffer cash and log cache in sql server?

593






How can you list all the table constraints in a database?

518


Can we take the full database backup in log shipping?

544


Give main differences between "Truncate" and "Delete".

583


Can an entity have two primary keys?

533


Working with TLogs

1453


How to verify the port number of the sql server?

561


What is the sql server agent?

590


What happens if strings are casted into wrong code pages in ms sql server?

569


What are different types of collation sensitivity?

542


What is the fastest way to permanently delete a 1 million row table named customers?

603