Difference between primary key and unique key ?

Answer Posted / umapathy.r

The column holding the primary key constraint cannot accept
null values.whereas colum holding the unique constraint can
accept null values assume that t3 is a table with two
columns t1 having primary key constraint and t2 having
unique constraint if u try to insert null into t2 it will
accept that values whereas column t1 will not accept null

Is This Answer Correct ?    1164 Yes 121 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object data modeling?

507


How to turn on or off recycle bin for the instance?

611


Can you tell me how to add new column in existing views?how?How is possible?

938


How to assign query results to variables?

591


List out the types of joins.

593






What is Library Cache in Oracle?

642


21. Using a set operator, display the client number of all clients who have ever placed an order and whose whose name does not contain the string Sm.

1621


What is the difference between I and G in Oracle?

603


What is a nested table and how is it different from a normal table?

578


Define oracle database

596


Please explain drop constraint oracle?

629


What is a nvl function?

566


How do I spool to a csv formatted file using sqlplus?

548


How to define an external table with a text file?

579


When do we use group by clause in a sql query?

570