Can a table have two primary keys?
Answer Posted / murali krishna penke
we can create more than one primary key in a table. the
maximum allowed to create primary keys for columns is 16,
but we call it primary key for one column only and the
remaining we call it as composite primary key..
create table TestPrimaryKey(ID int,Name nvarchar(50),Email
nvarchar(50),Phone nvarchar(12),cellphone nvarchar
(10),primary key(ID,Name,Email,Phone,cellphone))
the above table creates primary key for all above mentioned
columns.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is indexing in sql and its types?
What is rownum and rowid?
What is the maximum size of sqlite database?
How do you know if a relationship is 2nf?
Can we insert data into materialized view?
what is bcp? When is it used?
What is the need of a partition key?
What is procedure explain with example?
What are the advantages of indexing?
How can we debug in PL/SQL?
What is acid property in a database?
what are the non-standard sql commands supported by 'mysql'? : Sql dba
What is memory optimized?
Could you please provide oca (oracle 10g) dumps for my certification ?
Which sql statement is used to return only different values?