In the primary key have a multiple field or not?
Answer Posted / prashanth kumar
Yes , it have multiple fields.Run below query and creating
primary key on p_Id and LastName.
CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)
)
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio
What are the properties of the transactions?
What is the difference between stored procedure and user defined functions?
Why truncate is ddl?
Explain different types of index?
What is a partition key?
Difference between Inner vs outer joins?
What is forward - only cursors / read only cursor?
What is the purpose of the master database?
What is ms sql server triggers?
Is sql server is free?
where the connection string store in the database
Explain alternate key, candidate key and composite key in sql server?
Why do we partition data?
Some queries related to SQL