日期:2014-05-18  浏览次数:20485 次

空列转换成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