| |
GeekInterview.com > Interview Questions > Oracle > SQL
| Print | |
| Question: What is difference between UNIQUE and PRIMARY KEY constraints?
Answer:
A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL. |
| January 01, 2008 08:23:38 |
#9 |
| patilpravin_1981 |
Member Since: December 2007 Total Comments: 29 |
RE: What is difference between UNIQUE and PRIMARY KEY constraints? |
unique key can contains one null value primery key can not contain null value |
| |
Back To Question | |