Define the terms primary key foreign key and also the
difference between primary and the unique key

Answer Posted / pugal

Primary Key : The primary key of a relational table
uniquely identifies each record in the table

Foreign Key : These keys are used to create relationships
between tables.

Unique Key : In relational database design, a unique key is
a candidate key to uniquely identify each row in a table. A
unique key comprises a single column or set of columns

Difference between primary and unique key :

primary key not allows null values
unique key allows null values

Is This Answer Correct ?    33 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

558


How to shutdown your 10g xe server from command line?

556


When do we use group by clause in a sql query?

571


Please explain compound trigger in oracle?

601


What is the difference between substr and instr?

522






What is a snapshot in oracle database?

583


What is the difference between alert log file and tarce file ?

1635


How to establish administrator authentication to the server?

560


What is the difference between postgresql and oracle?

508


Explain the use of indexes option in exp command.

597


How to create a new view in oracle?

623


How to create a temporary table in oracle?

694


What is a dead lock in oracle?

598


Explain an exception?

568


How to manage transaction isolation level?

565