is there more the two primary key in a single table?

Answer Posted / vinay singh

There are no more than one Primary Key in a single table,
but we can make a Primary key using combination of more than
one column...
Example..

CREATE TABLE [LoginHist] (
[UserId] [char] (15) NOT NULL ,
[LogDate] [smalldatetime] NOT NULL ,
[ClientIp] [char] (15) NOT NULL ,
[LoginCount] [int] NULL DEFAULT (0),
CONSTRAINT [PK_LoginHist] PRIMARY KEY CLUSTERED
(
[UserId],
[LogDate],
[ClientIp]
) ON [PRIMARY]
) ON [PRIMARY]

** Vinay Singh
** Cell No - 9867774724

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain nested trigger in sql?

588


What is the difference between update lock and exclusive lock?

492


How to recreate an existing index in ms sql server?

544


How do I edit a procedure in sql server?

546


Explain the usage of floor function in sql server.

498






What is catalog views?

605


Difference between Logical Page and Physical Page in SSRS.

340


Can you tell me some of the common replication dmv's and their use? : sql server replication

531


What is a natural primary key?

522


What is your recommendation for a query running very slow? : sql server database administration

589


Does transparent data encryption provide encryption when transmitting data across the network?

624


How to concatenate two binary strings together?

605


What is the difference between dataadapter and datareader?

537


What is Sqlpaging in SqlServer 2005 ?

658


Does windows server 2016 come with sql server?

497