Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Modify PK Column size

Author  Topic 

S_Lakshmi
Starting Member

22 Posts

Posted - 2008-06-20 : 09:23:07
Hi,

Is it possible to increase the primary column size..?

The PK data type is Varchar (8). Now I want to increase to varchar (12).


Thanks
Lakshmi.S

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-20 : 09:38:15
First drop the primary key constraint on it and then alter it. Then again set the primary key constraint.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-20 : 09:38:50
B/w its always better to have primary key on an integer field.
Go to Top of Page

S_Lakshmi
Starting Member

22 Posts

Posted - 2008-06-20 : 09:39:59
Thanks visakh16, Is there any posiblity to do without droping the constraint

Thanks
Lakshmi.S
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-20 : 14:28:00
quote:
Originally posted by S_Lakshmi

Thanks visakh16, Is there any posiblity to do without droping the constraint

Thanks
Lakshmi.S


Nope. You need to drop it first.
Go to Top of Page
   

- Advertisement -