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
hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.
What are the hotfixes and patches in sql server?
How to declare a cursor with "declare ... Cursor" in ms sql server?
What is provisioning, billing and metering, and connection routing concepts in the service layer?
What is hot add cpu in sql server 2008?
How to locate and take substrings with charindex() and substring() functions?
What will happen if a column containing char type data is changed to the nchar data type?
What happens if you are trying to access a schema not owned by you?
What is transaction server explicit transaction?
Do you know the isolation level that sql server support?
Explain external key management in sql server 2008
If no size is defined while creating the database, what size will the database have?
How to view existing indexes on an given table using sp_help?
how will add additional conditions in sql?
What is table level trigger?