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 |
i have a table with 1 lac of data.i want to insert this data into another table. i want every 5000 of data insert use a commit.using counter and if error is comming in the 5000 of data it rollback.
How to load a large xml file?
Can a field be used in a report without it appearing in any data group ?
Hi, I want table structure shown below. How can i create this ? Num Name Address Addr1 Addr2 I want Addr1 and Addr2 under Address column. How can i achive this ? Is it possible ?
Can we call procedure inside function in oracle?
how to see the data (in unix) using dataset in datastage?
What a SELECT FOR UPDATE cursor represent.?
primary key is foreign key for the same table?
Explain the use of compress option in exp command.
what is the syntax of SELECT command?
How to drop an existing view in oracle?
How to open and close an explicit cursor in oracle?