WHAT IS THE DIFFERENCE BETWEEN PRIMARY KEY(PK) CONSTRAINT
AND UNIQUE KEY(UK) + NOT NULL(NN) CONSTRAINT ASSIGN TO A
COLUMN ?
INSTEAD OF ASSIGNING PK ,WE CAN ASSIGN UK + NN TO A COLUMN.
WHAT ARE THE MARRITS AND DEMARITS BETWEEN THE ABOVE TWO?THE
ABOVE TWO ARE SAME,THEY DON'T ALLOW DUPLICATE AS WELL AS
NULL VALUES.
Answers were Sorted based on User's Feedback
Answer / adil khan
1.you can assign UK + NN TO A COLUMN behave like PRIMARY KEY(PK)
but (UK + NN) can not make any relation with any other table.
where as PRIMARY KEY(PK) can make relation with others tables.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / shwetalguglanicse
Primary key can be assigned to only 1 column in the table but
this is not with unique key
And UK allow duplicate value but PK does not .
| Is This Answer Correct ? | 2 Yes | 8 No |
acname actype amount ac1 credit 300 ac2 credit 4000 ac1 debit 4000 ac2 debit 455 ac1 credit 500 how to get sum of credit and sum of debit for each account
Is primary key = unique key,not null? If yes,please explain IF No,please explain
How to define a cusotmer as a supplier in ORACLE R12
What is a trigger and what are its types in oracle?
Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?
where do i find oracle interview questions.
How to use subqueries in the from clause in oracle?
How to start a new transaction in oracle?
Is java required for oracle client?
What is pragma autonomous transaction in oracle?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
5. Display full details for the creditor/s who has received the single largest payment. Do not use a table join or set operator anywhere in your query.