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 are the join types in tsql? : Transact sql

1064


what are the different index configurations a table can have? : Sql dba

995


Do we need to create index on primary key?

929


what is error ora-03113: end-of-file on communication channel?

1163


What is pragma in pl sql?

1110


Which sql statement is used to delete data from a database?

956


What is the difference between a query and a report?

975


What are sql triggers used for?

995


What is the process of copying data from table a to table b?

1089


How many postgresql users are there, worldwide?

1061


what is timestamp in mysql? : Sql dba

1075


What is the primary use of normalization?

1003


Explain unique key in sql.

1012


What is localdb mssqllocaldb?

1068


What is pl sql architecture?

959