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

Explain commit, rollback and savepoint.

0 Answers  


What does <> sql mean?

0 Answers  


What is materialized view. What are different methods of refresh?

0 Answers  


what is difference between procedure and function

10 Answers   MCN Solutions, Wipro,


Can a table contain multiple primary key’s?

0 Answers  






What is the Diff b/w Constraints and Trigeer

4 Answers   HCL,


Why do we use sql constraints?

0 Answers  


please explain database architecture..

1 Answers   Infosys,


What is the difference between having clause and where clause?

0 Answers  


How do I write a sql query in pgadmin 4?

0 Answers  


I Have A Table Like This. Cityno Cityname Mails 1 Bangalore 8km 2 Hsr Layout 20km 3 Mejistic 30km 4 Jayadeva 55km 5 Itpl 80km 6 Hebbal 115km I Have Data Like This I Want O/p Like This Distance No.ofcity 0-50km 3 51-100km 2 101-150km 4 And So On

6 Answers   DELL, HCL, Oracle,


How exception handling is done in advance pl/sql?

0 Answers  


Categories