THE ONLY WAY I HAVE FOUND, IS TO DROP AND RE-CREATE THE TABLE. THIS CAN
CAUSE PROBLEMS WITH TRIGGERS, CONSTRAINTS AND REFERENTIAL INTEGRITY. I
FIRST, DROP ALL CONSTRAINTS AND TRIGGER TO THE TABLE. SECOND, RENAME THE
TABLE. THIRD, CREATE THE TABLE WITH NEW DEFINITIONS. FOURTH, APPEND ALL
DATA FROM OLD TABLE TO NEW TABLE. FIFTH, CREATE ALL CONSTRAINTS AND
TRIGGERS FOR THE NEW TABLE. FINALLY, DROP THE OLD TABLE. REMEMBER TO ALSO
REBUILD THE PERMISSIONS TO THE NEW TABLE WHEN DONE WITH THE CHANGES.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
BCP all the table's data to a CSV file, drop the table, recreate the table
with the new column, BCP the data in from the file, and you will be all
set.
Make backups first...
--
oxxxxxx)|[::::::::Lord::Willy:::::::::::::::>
Or Use Visual Interdev. It will allow you to change a SQL Server table's
definition and do all of that work for you behind the scenes (Yes, it all
happens) or you can save a generated script and use it later. Trust me, it
works.
-Peter
--
Peter W. DeBetta
pe...@milori.com
http://www.milori.com
"Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference."
What is Visual Interdev? Where to find it?
Huang