what is the difference between primary key & foreign key?

Answer Posted / sripathi venkata ramesh

I am Sripathi Venkata Ramesh from Gudivada and the answer
is mentioned below

Primary key: A Primary key is a column or group of columns
used to uniquely identify each row in a table like
It defines the column as a Mandatory column.
The data held across the column must be unique.
By default it creates clustered index.
It does not allow null values and duplicate values

Foreign key: A Foreign key is a column or group of columns
whose values are derived from the primary key of some other
table

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of tables supported by oracle?

587


what is a Nested Loop join?

1572


How to list all indexes in your schema?

588


How to retrieve data from an explicit cursor?

567


How to use "startup" command to start default instance?

550






What is transaction control statement and how many types of transaction control statement in Oracle?

573


How to open and close an explicit cursor in oracle?

583


What is an oracle function?

606


For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

1562


What is integrity and what is constraint??Explain with example

1707


How to select all columns of all rows from a table in oracle?

595


What is a dynamic performance view in oracle?

615


How to convert a date to char in oracle? Give one example.

594


What is a dead lock in oracle?

602


What happens if you lost a data file?

591