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??????

Answers were Sorted based on User's Feedback



IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / upendra

Primary key creates Clustered Indexes. Clustered indexes physically sort the data.
Unique can have only Non-clustered indexes, where data are not physically sorted.

Is This Answer Correct ?    14 Yes 1 No

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / shahid

the above answer is wrong ...we can use foreign key for
unique key also...

Is This Answer Correct ?    8 Yes 2 No

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / aritra biswas

With the creation of primary key the oracle server
automatically creates and maintains a index on the primary
key column(s). Because of that index, the searching
processes on that table will be very fast where as
declaring a column as a (unique+not null) will not create
any index on that colum(s).It has to be created manually by
the DBA/users if we wish to enhance the searching process.

Is This Answer Correct ?    8 Yes 7 No

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / prativa mishra

We can create more unique key in a table but we can not create more then one primary key in a table.At the time of primary key creation thr is a clusterd index created automatically and it sorts data physically. It helps in searching process which not possible in unique+notnull column

Is This Answer Correct ?    2 Yes 2 No

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / 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

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / john

primary key will not allow null values.but in case of
unique,more than one null value s accepted.

Is This Answer Correct ?    2 Yes 3 No

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / banti

Both r same :)
Primary Key= (Unique + Not Null)

Is This Answer Correct ?    2 Yes 4 No

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTE..

Answer / gazulas

if it is Primary key then we can make use foreign key in other table and can use the referential integrity concept

for unique keys we dont have that.

Is This Answer Correct ?    4 Yes 8 No

Post New Answer

More SQL PLSQL Interview Questions

Is a secondary key the same as a foreign key?

0 Answers  


What is before and after trigger?

0 Answers  


How do I make sql search faster?

0 Answers  


Explain dml and ddl?

0 Answers  


What is parameter substitution in sql?

0 Answers  


Can we use distinct and group by together?

0 Answers  


What is raid? How does it help storage of databases?

0 Answers  


what is data integrity? : Sql dba

0 Answers  


What is numeric function sql?

0 Answers  


How to remove duplicate rows from a table?.

3 Answers  


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

1 Answers   TCS,


Does sap use sql?

0 Answers  


Categories