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 |
What is a user role in oracle?
How to create a new tablespace in oracle?
What are the oracle built-in data types?
How to write numeric literals in oracle?
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.
Q) How to Find Max Date from each Group? (Asked in Infosys (INFI)Interview)
What is Private Database Link ?
How to lock and unlock a user account in oracle?
How to use an explicit cursor without open statements?
How to convert a string to a date in oracle database?
A VIEWS takes memory in the database. If yes, how can u proove it? is there any way to display the size of views?
I have a table that log salary-increase-process have fields: autoid, old_salary, acctno and table EMP: acctno, name, salary I want to list count increase-salary of employees, each have old_salary, new_salary. Help me with SELECT statement, please!