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
When we should use @@error?
What do you understand by physical_only option in dbcc checkdb?
What is the purpose of self join?
Explain the steps to create and execute a user-defined function in the sql server?
Write a sql query to display the current date?
If you want to send some data from access database to sql server database. What are different component of ssis will you use?
How to change parameter value inside the report?
What is the difference between an index and a unique index?
What is the syntax for encrypting a column in SQL Server?
What is transact-sql ddl trigger?
Explain syntax for dropping triggers?
How to enable tcp/ip protocol on a sql server?
What is the difference between substr and charindex in the sql server?
What happens if time-only values are provided as date and time literals?
Do you know how to implement service broker?