日期:2014-05-18 浏览次数:20657 次
--> 测试数据:[tb] IF OBJECT_ID('[tb]') IS NOT NULL DROP TABLE [tb] GO CREATE TABLE [tb]([name] CHAR(20)) INSERT [tb] SELECT 'aaaaa' UNION ALL SELECT 'bbbbbbbbbbbbbbbbb' UNION ALL SELECT 'cccccccccccccccccccc' UNION ALL SELECT 'sssssssss' --------------开始查询-------------------------- ALTER TABLE tb ALTER COLUMN name CHAR(60) SELECT * FROM [tb]
------解决方案--------------------