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
What is field with example?
Why use stored procedures in sql server?
How do I start sql server 2017?
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
What is the return type of executeupdate ()?
What is db stored procedure?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
How you can add messages to the nt event log from within a stored procedure?
Is it true, that there is no difference between a rule and a check constraint?
Why union all is faster than union?
What is 5nf in normalization form?
What is the exact numeric data type in sql?
tell me what is blocking and how would you troubleshoot it? : Sql server database administration
Does a specific recovery model need to be used for a replicated database? : sql server replication
What is attribute hierarchy? : sql server analysis services, ssas