is there more the two primary key in a single table?
Answers were Sorted based on User's Feedback
Answer / sathishrpillai
no, but there can be any number of forgein keys in a single
table.
A primary key of one table is the forgein key for other
table.
Is This Answer Correct ? | 4 Yes | 2 No |
No it is not possible.
A table has only one primary key
If the table has more than one primary key is called
composite key.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / navaneethakrishnan
no we cannot,
but we can do composite key in sql2005,
go in enterprise manager...
in the design view first set the primary key to one field
and then press ctrl key and set primary key to another field..
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sudheer gowlikar
we cannot have more than one primary key on a table since
primary will create a clustered index and we can have only
1 clustered index on a table since clustered index will
sort data in data pages and the data sorted in one way
rather sorting number of ways.
Is This Answer Correct ? | 2 Yes | 0 No |
If table has more than one primary key is called
composite key....
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vincent
create table StudMaster(studid int not null,studname varchar
(20) not null,constraint Studmaster primary key clustered
(studid,studname))
Is This Answer Correct ? | 0 Yes | 0 No |
What is the function of sql server agent windows service?
What is bit data type?
Explain couple pf features of SQL server
How to convert a table data in XML format in sql server?
How to fetch records from a One to Many relationship table. eg: wanna get details of all orders for a specific customer. (do not want repeatation of master table records for child table records)
What are the types of model in sql server and explain
How to enter binary string literals in ms sql server?
How to store and query spatial data?
Is there any difference between the primary key and unique key?
How is table type constraint applied to a table?
What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?
How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?