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
Which type of cursor is used to execute the dml statement?
Define a temp table?
What are the syntax and use of the coalesce function?
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
Can a table have no primary key?
Explain the select statement in sql?
How to assign sql query results to pl sql variables?
What is a pl/sql block?
How does a self join work?
Why functions are used in sql?
what is a control file ? : Sql dba
What is the use of count (*) in sql?
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
How does cross join work?
how many tables will create when we create table, what are they? : Sql dba