Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS
NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY
WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT
ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT
DUPLICATE VALUES?
SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND
PRIMARY KEY??????

Answer Posted / joshy joy

1. Primary key creates Clustered Indexes and they are physically sort the data.
2. Oracle server automatically creates and maintains an index on the primary key and because of that searching will be very fast on that table.
3. Primary can be used for referential integrity when dealing with foreign key in child table

1. Unique can have only Non-clustered indexes, where data are not physically sorted.
2. unique key + not null will not create any index on that column(s)
3. Key column should be Primary key column in parent table when when dealing with foreign key

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is procedure function?

982


Explain unique key in sql.

943


what is a relationship and what are they? : Sql dba

1025


What are the types of views in sql?

1039


What is trigger and stored procedure in sql?

976


Explain architecture of sql server notification services?

985


What is pl sql and why it is used for?

1070


What are all types of user defined functions?

1005


what is sql? : Sql dba

971


Explain the difference between triggers and constraints?

920


what happens if null values are involved in expressions? : Sql dba

1000


What is the purpose of primary key?

966


What is varchar used for?

1023


What does pl sql stand for?

1063


Compare sql & pl/sql

1046