is there more the two primary key in a single table?
Answer Posted / selvaraj.v
In SQL Server 2000,
Query :
-------
create table BookDetails
(
Book_ID int identity(1,1) not null primary key,
Book_Title varchar(20),
Book_Type varchar(15),
Book_Author varchar(25),
Book_Edition float,
Book_Publisher varchar(20),
Book_Pub_Year datetime,
Book_Price int primary key
)
Answer :
--------
Server: Msg 8110, Level 16, State 1, Line 1
Cannot add multiple PRIMARY KEY constraints to
table 'BookDetails'.
Reply Answer:
-------------
So,Can't Create more Primary Keys in a Table.
| Is This Answer Correct ? | 13 Yes | 5 No |
Post New Answer View All Answers
What is normalization process?
What do you understand by check constraint in sql server?
Can we use custom code in ssrs?
What is the difference between lock, block and deadlock? : sql server database administration
how to invoke a trigger on demand? : Sql server database administration
Does partitioning ssd reduce performance?
We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?
What are the kinds of subquery?
why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration
what's sql server? : Sql server database administration
What does indexation mean?
Explain having clause and where clause?
what are user defined datatypes? : Sql server database administration
How column data types are determined in a view?
What are window functions in sql server?