What are various constraints used in SQL?

Answer Posted / rajshri.20

SQL constraints are used to specify rules for the data in a table.

NOT NULL - Indicates that a column cannot store NULL value
UNIQUE - Ensures that each row for a column must have a unique value
PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Ensures that a column (or combination of two or more columns) have an unique identity which helps to find a particular record in a table more easily and quickly
FOREIGN KEY - Ensure the referential integrity of the data in one table to match values in another table
CHECK - Ensures that the value in a column meets a specific condition
DEFAULT - Specifies a default value when specified none for this column

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does for update in oracle 8 cause an ora-01002 error?

553


How to use in conditions in oracle?

565


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

1865


What is raw datatype?

595


How to shutdown your 10g xe server?

626






What is difference between truncate and delete?

567


What are the different types of record groups in oracle? Explain each of them

608


What is oracle latest version?

588


Explain the dml?

602


how can db_files > maxdatafiles since db_files is for instance and the later is for database

2180


Why oracle is used?

583


What is a data dictionary and how can it be created?

617


How to use windows user to connect to the server?

536


How many data types are supported?

624


How to retrieve the count of updated rows?

576