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
How to turn off warning messages during php execution?
What is a document index?
What is Extended user-defined?
What is similarity and difference between truncate and delete in sql?
What is proper subset of candidate key?
Mention the different types of replication in sql server.
what is a self join? : Sql server database administration
How to convert numeric expression data types using the cast() function?
Write a sql query to sort on different column name according to the parameters passed in the function?
How to check status of stored procedure in sql server?
How to create a dml trigger using create trigger statements?
Tell me the difference between clustered and non-clustered index?
What is the recovery model?
What is Lock table in SQL?
What are the requirements for sql server 2016?