What is difference b/w composit key n primary key and
forigion key?

Answer Posted / sathish

Assume a table contains columns
book name
author name
price

>>composite key

Having multi column primary key for a single table is known as composite key.

ex: primary composite key is book name and author name

>>primary Key

Primary key is the unique key, do not accept null value and used as a id to fetch the record from the table.

>> Foreign Key

A primary key of a table which is used as a reference key of another table..

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to include numeric values in sql statements?

503


How do I select a database in mysql workbench?

498


How do I change directories in mysql?

478


How would you enter characters as hex numbers?

518


What is mysql and why it is used?

560






Write a command to list all databases in mysql?

529


What is pdo :: fetch_assoc?

497


Can we store images in mysql database?

482


How do I view tables in mysql workbench?

448


How is mysql database stored?

537


How do you rename a table in mysql?

507


What is text in mysql?

497


What is clob in mysql

487


In a property booking section want a query to check that property is booked from StartDate to EndDate.Booking Table field are given id proerty_id start_date checkout_date no_of_visitor booking date status Waiting yours answer.. Thanks In Advance...

2586


Can I use mysql for free?

478