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

Answer Posted / saraswathi muthuraman

Compost key :

More than one column will be used to create compst key

SQL> create table ts_250 (a number,b number,c number,
primary key(a,c));

Table created.

here column A and column C is used to create compst key.
U can't insert null value in both columns.
Only unique combination of column A and column B value can
be inserted.

Primary key :

Key will be created on a single column in table.

SQL> create table ts_251 (a number,b number,c number,
primary key(a));

Table created.


null value cann't be inserted into column a.
oracle will create a index
only unique value can be inserted into column a.
only one primary key can be created on a table

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is constraints? Also explain the different types of constraints?

523


How can I create database in mysql?

502


what is the procedure to configure the application of mysql?

501


What is sqlyog?

616


What is a definer?

475






What are the common mysql functions?

491


Does mysql use tcp or udp?

527


Tell us something about heap tables?

552


Does mysql case matter?

493


What is mysql aggregate functions? Explain

529


How to change a password for an existing user via mysqladmin?

567


What are date and time data types in mysql?

524


How do I find my mysql username and password?

551


How do I start mysql database?

478


What is the current version of mysql?

483