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


Difference between primary key and unique key ?

Answers were Sorted based on User's Feedback



Difference between primary key and unique key ?..

Answer / tom

There is two difference between them.

1. The not null constraint is by default added to primary
key, it means, primary key attribute cannot accept null
values, whereas, the attribute declared as unique can accept
null values. It is the major difference between the two.

2. Secondly, we can have only one primary key in a relation,
whereas, multiple attributes can be declared unique at the
same time.

Is This Answer Correct ?    1 Yes 0 No

Difference between primary key and unique key ?..

Answer / jason james john

unique key is a key that uniquely defines the characteristics of each row whereas primary key consists of characteristics that cannot collectively be duplicated by any other row.primary key will not allow null values whereas unique key will allow nulls.

Is This Answer Correct ?    1 Yes 0 No

Difference between primary key and unique key ?..

Answer / m

thanks for ans.

Is This Answer Correct ?    0 Yes 0 No

Difference between primary key and unique key ?..

Answer / sarvan yadav

primary key does not null,but unique key also null.

Is This Answer Correct ?    2 Yes 2 No

Difference between primary key and unique key ?..

Answer / rajkumar tiwari

Primary key contain non repetitive value and not null
value,and primary key is created on clustered index.In the
table their should be one primary key column.

Is This Answer Correct ?    2 Yes 2 No

Difference between primary key and unique key ?..

Answer / himanshu porwal

Primary key does not allow null values whereas in UNIQUE constraint we can have 1 null value means for that column one null value is allowed.

Is This Answer Correct ?    2 Yes 2 No

Difference between primary key and unique key ?..

Answer / praveen

primary key not allows null values, but unique key allows null values. only one primary is possible in one table, but multiple unique keys are possible in a table. Each unique key accepts only one null field. Both are used to prevent repeated entry of values.

Is This Answer Correct ?    1 Yes 1 No

Difference between primary key and unique key ?..

Answer / suman chatterjee.

uniqe key may contain null values but primary key can not take the null values.

Is This Answer Correct ?    3 Yes 3 No

Difference between primary key and unique key ?..

Answer / mareeswaran-jeyakani

The primary key cannot be accept the null values.The unique key can accept null values. assume that you have a two
columns column1 having primary key constraint and column2 having unique constraint if u try to insert null into column2 it will accept that values whereas column1 will not accept the null values.


THANK YOU.ALL THE BEST...............

Is This Answer Correct ?    2 Yes 2 No

Difference between primary key and unique key ?..

Answer / yogesh kumar

primary key is unique define in a table, it means if u
declare primary key value is not allows duplicate and null.

unique key allows repeats' a value and null.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

how do u know the total no of rows in a table?

6 Answers  


What is RULE-based approach to optimization ?

1 Answers  


How to define an oracle cursor variable?

0 Answers  


What is an oracle user role?

0 Answers  


How to use "if" statements on multiple conditions?

0 Answers  


How to transfer database(500 gb) of oracle enterprise edition to standard edition downtime is only 1 hour not using exp/imp option ?

3 Answers   Digital Group,


1. what is a single procedure? 2. suppose a view constructed on a query... after that in the master table a column was dropped, then what will be the status of that view? will it be invalid or something else? 3. what is mutating table error? how can you solve that problem? 4. suppose "select * from emp where empno=7788;" is running slow because of what ever the cause it is.. how can you fix it and make the execution faster? 5. will the snapshot of data will be stored in the RAM , where will ir be stored exactly. 6. how to delete 100 tables or 100000 tables' data from the schema without writing delete statement for no.of times. write an sql statement to do that job. 7. suppose a package contains so many cursors, procedures and all.. and we are using such types of procedures so many in a program. so the execution is to be stored all those packages and all to the RAM. utimately it is using many resources for each time execution. how can you reduce the time and using of resources for each execution because the query need to be run many times. how can you tune that? 8. suppose a procudere is there with specs as (a,b,c,d), all of these are IN mode only then while calling them should we pass all the 4 arguments? how to pass (b,c) only.. how ever the specs are wrote in the same order displayed in the above? 9. a function is returning a table type, how to access that function in a select statement? 10. i have a table in database A and another table in database B, how can you access the data of these two tables? write a query for that with dblinks. 11. i have two tables might have 15/20 columns in that.. i wanna send these columns(table) to the front end application for example you are using asp.net by writing a procedure. write that to perform the above job. 12. shall we create a table in the package? 13. shall we create a table in the procedure? 14. suppose i have 10 records, in that i want to select 7th record. write a query for that. cant you use rownum for this? 15. suppose my procedure has got around 20 select statements, in that some three select statements are running very slow. what will you write to detect which queries are running slowly? 16. what fields you use frequently in plan_table? 17. what is pipeline function? explain me with an example. 18. does a unique column can contain more than one null? 19. how many hints are there provided by oracle?

5 Answers   Honeywell,


How to add a new column to an existing table with a default value?

0 Answers  


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

0 Answers  


Explain can a view based on another view?

1 Answers  


How to start a new transaction in oracle?

0 Answers  


How to define an explicit cursor in oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)