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 are the aggregate and scalar functions?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
Explain tablesample?
In which format does an image save in SQL Server database ?
How to convert a numeric expression from one data type to another?
What is a subquery in a select query statement in ms sql server?
Explain relational data?
how many layers of tcp/ip protocol combined of? : Sql server database administration
How to maintain a fill factor in existing indexes?
Difference between Triggers and Stored Procedure
23 Answers Claimat, HCL, Protech, Silgate,
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?
Can someone suggest me the best institute to learn SQL Server... I want to gain in depth knowledge on SQL Server Development. I have been to naresh, peers, sql school,mind q systems... Any idea about best faculty....
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)