Varchar(255) 到 Varchar(MAX) [英] Varchar(255) to Varchar(MAX)
本文介绍了Varchar(255) 到 Varchar(MAX)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将 SQL Server 2008 数据库中的列类型从 varchar(255)
更改为 varchar(MAX)
而不必删除表并重新创建?
Is it possible to change a column type in a SQL Server 2008 database from varchar(255)
to varchar(MAX)
without having to drop the table and recreate?
SQL Server Management Studio 每次我尝试使用它时都会向我抛出一个错误 - 但是为了省去头疼,我很高兴知道我是否可以更改类型而无需 DROP 和 CREATE.
SQL Server Management Studio throws me an error every time I try to do it using that - but to save myself a headache would be nice to know if I can change the type without having to DROP and CREATE.
谢谢
推荐答案
您应该可以使用 TSQL 来完成.
You should be able to do it using TSQL.
类似的东西
ALTER TABLE [table] ALTER COLUMN [column] VARCHAR(MAX)
这篇关于Varchar(255) 到 Varchar(MAX)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文