Can a table have two primary keys?

Answer Posted / uhaish

Yes and it can and the number of primary keys in a single
table is not limited and can be 3,4, unlimited .The concept
is imagine 2 primary keys cols in a table as one primary
key col .
which means if you have two cols A and B both are primary
key by defination then..
AB
00
01
02
12
21
21
22

,see individually a primary key col is not anymore unique
but as hole its unique no other row in a table can have the
same combination of these two primary keys i.e '02' cannot
be repeated .

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is not equal in sql?

567


How do I remove sql plus from windows 10?

568


What is the use of double ampersand (&&) in sql queries? Give an example

613


What is the maximum rows in csv?

485


What packages are available to pl/sql developers?

603






how to convert character strings to dates? : Sql dba

525


Show how functions and procedures are called in a pl/sql block.

588


What is indexing in sql and its types?

545


How to execute a stored procedure?

563


what is a join? : Sql dba

563


Can we commit in trigger?

548


Is mariadb nosql?

584


Explain what is a subquery ?

656


What is a full join sql?

593


what is blob? : Sql dba

563