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 difference between set and select?
How do you load large data to the SQL server database?
Can we call stored procedure in view in sql server?
What is Primary key and foreign key? Give an example
What is data source in connection string?
What is triggers and stored procedures?
Department ----------- salary Deptname 1000 A 3000 A 2000 B 3000 B 4000 C 5000 C select the deptname where salary >=5000 result should be: Deptname --------- C please post only executed query in SQL server 2005 Asked By: Md. Niyaz
What is Check point? Explain in Brief what it will do?
what is extended StoreProcedure ?
What is the language structure to add a record to a table?
Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?
What are the different types of replication are there in sql server 2000?
Oracle (3253)
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)