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
What are all the different normalization?
Is postgresql a server?
what happens if null values are involved in expressions? : Sql dba
Is truncate ddl or dml?
What if we write return in procedure?
Is it possible to create startup or shutdown trigger for on-schema?
Explain the order of sql statement execution?
What are functions in sql?
how to delete an existing column in a table? : Sql dba
What is a schema sql?
How many types of triggers exist in pl/sql?
what is a tablespace? : Sql dba
What is the difference between the implicit and explicit cursors?
how to get @@error and @@rowcount at the same time? : Sql dba
How can we avoid duplicating records in a query?