Can a table have two primary keys?

Answers were Sorted based on User's Feedback



Can a table have two primary keys?..

Answer / anand

Yes table can have two or more primary key,when we want to
create more then one primary we use unique constranit with
not null or we can create with triggre.

Is This Answer Correct ?    1 Yes 6 No

Can a table have two primary keys?..

Answer / sandeep yadav

Yes table can have two or more primary key.

Is This Answer Correct ?    1 Yes 9 No

Can a table have two primary keys?..

Answer / ashwin kumar

yes, a table may have more than 1 primary keys but, of them
we only choose 1 column as identifiable column called
primary key. The other columns are called surrogate keys or
candidate key.

Is This Answer Correct ?    25 Yes 43 No

Can a table have two primary keys?..

Answer / jamalvalli

Yes we can use. for Example

create table emp(empno number(5), ename varchar2(20),
deptno number(5) add primary key Pk_constraint( empno,
deptno))

Is This Answer Correct ?    18 Yes 38 No

Post New Answer

More SQL PLSQL Interview Questions

What is the process of debugging?

0 Answers  


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

0 Answers  


What is the difference between left join and right join?

0 Answers  


What are the ddl commands?

0 Answers  


What are types of indexes in sql?

0 Answers  






how to create table with in the procedure or function?

2 Answers   Genpact, HCL,


What is raw datatype in sql?

0 Answers  


What is sql injection owasp?

0 Answers  


My select statement is not working as expected, So, to overcome from such issues what are the steps needed to be taken care?

2 Answers   CG,


What are operators available in sql?

0 Answers  


trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output trans_id trans_date trans_amt debit_credit_indicator 001 JAN 1599 cr no.of trans 2 i want trans_id and trans_date like 'JAN' or 'FEB' etc, trans_amt i want all credit amount - debit amount per each trans_id. and debit_credit_indicator and no.of transactions in a month.

1 Answers   Oracle,


What is rank function in sql?

0 Answers  


Categories