How to create Clustered Primary Key to table?

Answer Posted / sarika jayadave

USE <DATABASE NAME>
GO
ALTER TABLE [SERVER NAME].[TABLE NAME]
ADD CONSTRAINT [PRIMARY KEY NAME]
PRIMARY KEY CLUSTERED
(
[ORDER BY FILED NAME] ASC
)

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me the use of keyword with encryption. Create a store procedure with encryption?

542


Is it possible for a stored procedure to call itself or recursive stored procedure?

499


How to connect a database with sql express.?

560


What is sql server schema compare? How we can compare two database schemas?

553


What is partition, how will you implement it? : sql server analysis services, ssas

594






Tell me what is difference between view and materialized view?

515


Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.

523


What are the kinds of subquery?

522


What are 3 ways to get a count of the number of records in a table?

602


What are the different methods available under sqlcommand class to access the data?

680


Explain what are the different index configurations a table can have?

684


What do you understand by sql server agent?

523


What is data file in computer?

536


What is the data tier application?

145


What are different replication agents and what's their purpose? : sql server replication

561