Can a table have two primary keys?

Answer Posted / pardeeep

NO,A table have only one primary key.But we can use it on more then one column.
Exp..
create table emp(empno int,ename nvarchar(20),deptno int,constraint Pk_constraint primary key( empno,deptno))
This query for SQL server

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a memo field?

529


Do ddl statements need commit?

540


What is coalesce sql?

515


What is the advantage of nosql?

527


which tcp/ip port does sql server run on? : Sql dba

517






what are the different type of normalization? : Sql dba

556


Why do we use %rowtype & %type in plsql?

607


Does sql full backup truncate logs?

531


what are tables and fields? : Sql dba

580


Describe sql comments?

561


How long it takes to learn pl sql?

533


Is truncate ddl or dml?

545


what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba

506


What is a full join sql?

593


How do I install sql?

522