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 data modification?
Does order by actually change the order of the data in the tables or does it just change the output?
Explain comment on transactions?
Find first and last day of current month in sql server
How to create a user name in a database?
How do I find the transaction log size in sql server?
How can you set the threshold at which sql server will generate keysets asynchronously?
Explain the working of sql privileges?
What is replication with database mirroring? : sql server database administration
Explain trigger classes i.e. Instead of and after trigger?
What are the different types of subquery?
How do you size a resultset?
What are the properties of sub-query?
How you would rewrite the sql query to return the customerid sorted numerically?
How do I find my localdb version?