|
rammohan
Posting Yak Master
India
212 Posts |
Posted - 02/05/2010 : 03:07:41
|
hi,
i want to alter a column in sqlserver 6.5, i want to increase the length of column.
follwing code throwing error :
ALTER TABLE Trace ALTER COLUMN [Message] varchar(8000) ::in correct syntaxt near column.
please show me a way
One can never consent to creep,when one feels an impulse to soar RAMMOHAN
|
|
|
Kristen
Test
United Kingdom
22191 Posts |
Posted - 02/05/2010 : 04:03:51
|
I think you have to rebuild the whole table to extend a column, don't you?
Drop constaints and foreign keys
Create a new, temporary, table with desired changes
Reapply constraints
INSERT INTO TempTable SELECT * FROM OriginalTable
Drop original table
Rename TempTable to OriginalTable
Reapply PK and indexes and FKeys
Personally I would make the changes in Table Designer in a more recent version of SQL, script the change, and then apply the script to the old database. |
 |
|