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 can we delete duplicate rows in a table?

568


What are the different types of partitions in oracle?

498


Please explain oracle data types with examples?

590


6. Display the client name and order date for all orders using the traditional method.

1753


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 ?

1558






What is SQL access advisor in Oracle?

634


How to bring a tablespace offline?

543


How to fetch the row which has the max value for a column?

542


How will you write a query to get a 5th rank student from a table student_report?

1378


what is difference between sql plus and sql*plus? (not sql and sql plus).

3351


What privilege is needed for a user to delete rows from tables in another schema?

564


Explain the difference between replace() and translate() functions in oracle?

582


How to write numeric literals in oracle?

618


What is an external table?

588


What is the difference between hot backup and cold backup in oracle? Tell about their benefits also.

545