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

Answer Posted / sivakumar

No, When creating table using script we can create primary
key another one is called composite key that means
combination of more than
one column...



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

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define candidate key, alternate key, and composite key.

526


optimization techinques

2183


Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture

486


How to truncate the log in sql server 2012? : sql server database administration

561


What is user-defined scalar function?

543






How to count duplicated values in a column in ms sql server?

501


What is the difference between rank and dense_rank?

494


What does truncate do?

522


Explain the properties of subqueries in sql server?

527


Explain the collation?

614


Where do we use trace frag?

558


Do you know what is normalization of database? What are its benefits?

546


Write a SQL query to delete a table?

639


What is in place upgrade in sql server?

509


What is collation sensitivity? Explain different types.

537