读书人

空列转换成varchar(200)类型的办法解决

发布时间: 2012-01-16 23:36:51 作者: rapoo

空列转换成varchar(200)类型的办法
有以下SQL语句:
select a.*,NULL PropertyValue
into ##TempCfgPropertyType from CfgPropertyType a where DevTypeID=125 select * from ##TempCfgPropertyType

设想:
把 PropertyValue 列转换成varchar(200)类型,不想定义一个变量的方法投入列。

[解决办法]
学习,没有看能明白,水准不够啊!
[解决办法]
select a.*, cast(NULL as varchar(200)) PropertyValue
into ##TempCfgPropertyType
from CfgPropertyType a where DevTypeID=125 select * from ##TempCfgPropertyType

读书人网 >SQL Server

热点推荐