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 2000 Forums
 SQL Server Development (2000)
 Altering columns

Author  Topic 

shaun567
Starting Member

1 Post

Posted - 2002-06-18 : 08:41:17
Hello folks,

I hope this is the right area to post this query - if not please let me know where...

When I'm altering a column on a table from script if there is any indexes and/or foreign keys etc attached I have to go through the properties to find them and manually re-create the objects after dropping them and making the alteration to the column.

My question is - is there an easier way to do this from script as the database already knows what is attached to the column and table?? or is the the normal method for altering columns from script?

Thanks in advance,
Shaun.

izaltsman
A custom title

1139 Posts

Posted - 2002-06-18 : 15:37:08
Depends on what exactly you are trying to do.
But generally, if you are modifying a column, you will need to drop constraints that reference it, and then re-create the constraints afterwards. Dropping and creating constraints can be scripted.

Go to Top of Page
   

- Advertisement -