what are the advantages of primary key over unique+notnull

Answers were Sorted based on User's Feedback



what are the advantages of primary key over unique+notnull..

Answer / tulsi

Primary key will avoid duplicate and null values in a table
which the combination of unique+not null will do.But the
advantage is,if a table has primary key we can create
relation to child tables.

Is This Answer Correct ?    28 Yes 13 No

what are the advantages of primary key over unique+notnull..

Answer / shilpa.oracle

Primary key accepts only unique values and does not allow
null values.

Unique key accepts unique values and allows null values.

not null constraint allows duplicate values and doesnt allow
null values.

When a primary key constraint or unique key constraint is
created by default index is created on the columns with
these constraints.

Is This Answer Correct ?    16 Yes 4 No

what are the advantages of primary key over unique+notnull..

Answer / smita

A Foriegn key can refer to the primary key.
A Foriegn key can refer to the unique key also .

Is This Answer Correct ?    14 Yes 6 No

what are the advantages of primary key over unique+notnull..

Answer / soubhagya

When we create a primary key automatically a cluster index
is created on those columns involved in primary key.But
this index not created in unique+not null key, it only
restrict the duplicate values.

Is This Answer Correct ?    4 Yes 3 No

what are the advantages of primary key over unique+notnull..

Answer / kamal

we are able to create a primary key for combination of more
than 1 column. which is not possible in Unique,we should
create unique key for each and every column in the table
individually.

ex . we can create a primary key for (Name,DOB,address)- ie
combination of these three columns be unique.

Is This Answer Correct ?    3 Yes 5 No

what are the advantages of primary key over unique+notnull..

Answer / charumathi

Unique-Duplicates not allowed
Nulls allowed
Not null-NUlls not allowed
Primary key-No Duplicates
No Nulls
A Foriegn key can refer to the primary key.

Is This Answer Correct ?    4 Yes 7 No

what are the advantages of primary key over unique+notnull..

Answer / nitesh

PRIMARY KEY CREATED WITH INDEXES WHICH IS NOT HAPPEN WITH
UNIQUE AND NOT NULL

Is This Answer Correct ?    8 Yes 21 No

Post New Answer

More SQL PLSQL Interview Questions

what are wild cards used in database for pattern matching ? : Sql dba

0 Answers  


Can we use SQL%ISOPEN in implicit cursors? Does this attribute works properly in Implicit Curosors?

3 Answers  


How can the performance of a trigger be improved?

0 Answers  


What is localdb mssqllocaldb?

0 Answers  


How do I kill a query in postgresql?

0 Answers  






Explain how exception handling is done in advance pl/sql?

0 Answers  


Maximum how many triggers can we use in trigger and How to find out how many records it fetched.

1 Answers   TCS,


how to check myisam tables for errors? : Sql dba

0 Answers  


Can a procedure in a package be overloaded?

0 Answers   EXL,


What is the difference between having and a where in sql?

0 Answers  


1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? 4 ORDER BY 1 What is the minimum number of joins that must be specified on line 3 in the sample code above to properly link the tables? Notice that the table "atable" is aliased twice: once as "a" and once as "b." 1. One join 2. Two joins 3. Three joins 4. Four joins 5. Five joins

6 Answers   Sonata,


What information is needed to connect sql*plus an oracle server?

0 Answers  


Categories