Difference between primary key and unique key ?
Answer Posted / madhumita majhi
In SQL both primary key and unique enforce uniqueness of
the column on which they are defined. But by default
primary key creates a clustered index on the column, where
are unique creates a non-clustered index by default.
Another major difference is that, primary key doesn't allow
NULLs, but unique key allows one NULL only.
Unique Key: Identify the row by uniquely, means if you are
inserting a records into the table suppose you already
inserted a record with ID 101 and another record you are
inserting with the same ID then it will give an error
(unique key voilation).
Prmary Key:Once you define a primay key on a particular
column then a column become a mandatory field.That means
you need to insert something on it, you can not leave as a
blank otherwise it will give an error as primary key
voilation.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance
What are the limitations oracle database 10g xe?
How do I escape a reserved word in oracle?
How to pass a parameter to a cursor in oracle?
How to export data to a csv file?
How to connect the oracle server as sysdba?
What is tns service name?
Can group functions be mixed with non-group selection fields?
Explain how you would restore a database using RMAN to Point in Time?
How to export your connection information to a file?
What is meant by a deadlock situation?
What do you mean by group by clause?
How to resolve name conflicts between variables and columns?
Explain the use of indexes option in exp command.
What is the difference between substr and instr?