| |
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. |
| October 10, 2006 10:23:26 |
#3 |
| sugapriyaraja |
Member Since: Visitor Total Comments: N/A |
RE: What is difference between UNIQUE and PRIMARY KEY ... |
Primary Key: only one column in a table,not accepted null values. Unique Key: More then one column in a table, null values accepted. |
| |
Back To Question | |