I have a table on SQL Server 2005 that was about 4gb in size.
(about 17 million records)
I changed one of the fields from datatype char(30)
to <
Alternatively, you could do a full table rebuild to ensure there's no extra data hanging around anywhere:
CREATE TABLE tmp_table();
GO
INSERT INTO tmp_table() SELECT FROM ;
GO
DROP TABLE ;
GO
EXEC sp_rename N'tmp_table', N'';
GO
Of course, things get more complicated with identity, indexes, etc etc...
- 热议问题