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


Please Help Members By Posting Answers For Below Questions

How to turn off warning messages during php execution?

725


What is a document index?

770


What is Extended user-defined?

712


What is similarity and difference between truncate and delete in sql?

774


What is proper subset of candidate key?

763






Mention the different types of replication in sql server.

746


what is a self join? : Sql server database administration

696


How to convert numeric expression data types using the cast() function?

722


Write a sql query to sort on different column name according to the parameters passed in the function?

695


How to check status of stored procedure in sql server?

657


How to create a dml trigger using create trigger statements?

734


Tell me the difference between clustered and non-clustered index?

684


What is the recovery model?

723


What is Lock table in SQL?

1189


What are the requirements for sql server 2016?

690