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
Can you change the data type of a column in a table after the table has been created? If so, which command would you use?
Is it possible to have clustered index on separate drive from original table location?
How is a full-text index updated?
What is difference between drop truncate and delete?
What do you understand by physical_only option in dbcc checkdb?
but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration
What is join query?
Explain the concepts and capabilities of sql server?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
What is master database? : SQL Server Architecture
Does dbcc checkdb requires db to be in single_user mode? : sql server database administration
Explain what is it unwise to create wide clustered index keys?
What are triggers in ms sql server?
Does union all remove duplicates?
How you provide security to cube? : sql server analysis services, ssas