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 |
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
What type of Index will get created after executing the above statement?
How to generate the Reports for the Database? I need an Example for it.Will we manually do this or else any script is there? Please let me know ASAP...
How do you trace the traffic hitting a sql server?
When would you use it?
What are the Advantages of using CTE in sql server?
What are different types of statements that are supported by sql?
What is the status of services on passive node for failover cluster in sql server? : sql server database administration
What are different types of data sources?
Explain tablesample?
One table Test with single column. These are the values in the table a b c d e f g h I need a query (without using any variable) with output as - a b c d f f g h
Let’s say the table in the database is named as TBL_Register. The fields in this table include: 1. User_Name, 2. User_Telephone, 3. Register_Date The field Register_Date stores the current date and time of the registration. Write the SQL statement that inserts the data into the table.
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)