首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

不能比较或排序 text、ntext 和 image 数据类型,该如何解决

2012-01-24 
不能比较或排序 text、ntext 和 image 数据类型 下面是存储过程代码createproceduremyproc@bodyntextas这里

不能比较或排序 text、ntext 和 image 数据类型

下面是存储过程代码

create   procedure   myproc
@body   ntext
as

这里要判断用户给的body   参数是否是空的?   然后在执行存储过程
if(body <> ' ')
begin
    --   xxxxxxxxxxxxx
end


提示错误,怎么办?   用   is   null   好象也不正确



[解决办法]
create procedure myproc
@body ntext
as

if(@body is not null)
begin
print '111 '
end
你使用变量的时候搞错了!!

热点排行