Question Locked

primary key

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
can we change primary key in sql server? if can how?

2 replies

by shellbot

how do you want to change it?
do you want to delete your existing one?

if so:

ALTER TABLE tablename
DROP CONSTRAINT primarykeyname

make sure you've nothing dependant on this before you do it though..

or are looking to modify it?

have a read of BooksOnline..search CONSTRAINT
or even have a look at this:
http://msdn.microsoft.com/en-us/library/aa275462(SQL.80).aspx

This discussion is closed to new replies.