读书人

不能比较或排序 text、ntext 和 image

发布时间: 2012-01-24 23:11:54 作者: rapoo

不能比较或排序 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
你使用变量的时候搞错了!!

读书人网 >SQL Server

热点推荐