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

Explain system scalar functions?

595


What is surrogate key? : sql server analysis services, ssas

703


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

1726


What are the five major components of a dbms?

520


what is the system function to get current user's user id? : Sql server database administration

565






What are the lambda triggers?

495


What is query optimizer in sql server?

555


Explain primary key and foreign key constraints?

528


You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?

660


What do you understand by triggers and mention the different types of it?

496


Does dbcc checkdb requires db to be in single_user mode? : sql server database administration

533


How to execute stored procedure and set temp table in sql server?

564


What are character string data types in ms sql server?

649


What is data mart? : sql server analysis services, ssas

609


How to make a column nullable?

609