Difference between primary key and unique key ?

Answer Posted / hemendra singh chaudhary

In the Table a primary key constraint column cannot holding
the null values.whereas unique constraint colum can holding
the null values.
Ex.|--------------------|
| ID(P) | Name(U) | #ID(P) ->It's a Primary Key
|--------------------| * Its a Not Null
| 1 | Hemendra | * A table Contain 1 Primary
| 2 | Neeraj | Key.
| 3 | PremJe | #Name(U)->It's a Unique Key
|NotNull |canbe Null| * Its can contain Null Value
|--------------------| * A table Contain more
than 1 unique Key.

Please Check the Radio Button..........
******************Gud Luck********************

Is This Answer Correct ?    45 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

557


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

570


How do we display rows from the table without duplicates?

550


I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?

625


Explain a data segment?

649






What are the different oracle database objects?

588


What are the differences between char and varchar2 in oracle?

565


Use of an integrity constraint is better to validate data. Explain

546


Write a syntax for update query in oracle?

620


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

548


How to import one table back from a dump file?

595


What is using clause and give example?

587


Can we connect to ORACLE db using Windows Authentication?

722


What is the sql query to concatenate column values from multiple rows in oracle?

562


What are the set operators union, union all, minus & intersect meant to do?

563