How to create Clustered Primary Key to table?

Answers were Sorted based on User's Feedback



How to create Clustered Primary Key to table?..

Answer / 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

How to create Clustered Primary Key to table?..

Answer / saravakumar

USE [AdventureWorks]
GO
ALTER TABLE [Sales].[Individual]
ADD CONSTRAINT [PK_Individual_CustomerID]
PRIMARY KEY CLUSTERED
(
[CustomerID] ASC
)

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL Server Interview Questions

What is a rollup clause?

0 Answers  


What is the difference between value type and reference type?

0 Answers  


How can you list all the columns in a database?

0 Answers  


What is extent? Types of extents?

0 Answers  


What is data source document?

0 Answers  






How can you get @@error and @@rowcount at the same time?

9 Answers  


what is nonclustered index

0 Answers  


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

0 Answers  


Can we use where clause with group by?

0 Answers  


What is use of @@ spid in sql server?

0 Answers  


What is role playing dimension with two examples? : sql server analysis services, ssas

0 Answers  


What is default port number for sql server 2000?

0 Answers  


Categories