Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 17,580 of 19,505    |
|    Smith to All    |
|    How to change columns on which there are    |
|    21 Jul 09 23:11:26    |
      From: no@thank.you              Hi              I've got databases (both SQL Server 2000 and 2005) wherein an ID column is       used in many tables. I now need to extend this field from nvarchar(20) to       nvarchar(32). It's nvarchar since it contains both numbers and letters.              How do I go about this?              Do I drop PKs, FKs and indexes, alter the columns to nvarchar(32) and       re-create PKs, FKs and indexes?              I've read about disabling constraints. It isn't possible to disable PKs? But       is it okay to disable FKs and alter column which is part of the FK?              Dropping / disabling PKs, FKs and indexes will not impact the content of the       tables?              Is there an easy way to generate the script that will make the changes or do       I need to "write it by hand"? Is it possible to use "Auto generate change       scripts" feature?              A lot of questions but I hope someone can help me on my way :-)              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca