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 does ss stand for sexually?
What are different types of constraints?
How to transfer data from a cursor to variables with a "fetch" statement?
Can we install sql server 2016 on windows 7?
What does top operator do?
How will you hide an attribute? : sql server analysis services, ssas
What is buffer cash in sql server?
what are database files and filegroups? : Sql server database administration
What is efficiency data?
What types of replication are supported in sql server?
When would you use it?
Give the query of getting last two records from the table in SQL SERVER?
Can binary strings be converted into numeric or float data types?
Tell me what do you understand by a view? What does the with check option clause for a view do?
What is difference between materialized view and view?