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 sql server replication? : sql server replication
How to generate create table script on an existing table in ms sql server?
What is transactional replication?
Explain the cursor lock types?
What stored by the master? : sql server database administration
Find columns used in stored procedure?
Explain how you can deploy an SSRS report?
What is use of except clause? How does it differ from not in clause?
What are the advantages of using cte?
What are scheduled tasks in sql server?
What is model database? : SQL Server Architecture
how to do partition in sqlserver
What is the cartesian product of the table?
List the different types of joins?
What are a database and a data warehouse?