当前位置: 代码迷 >> Sql Server >> 空列转换成varchar(200)类型的办法解决方案
  详细解决方案

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

热度:186   发布时间:2016-04-27 16:53:51.0
空列转换成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
  相关解决方案