函数返回文本 [英] function return text
本文介绍了函数返回文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建这个功能但不允许使用sql,
创建 FUNCTION returnrahgiri( @ rahgiri text )
RETURNS text
as
BEGIN
return (选择响应来自 work_with_us 其中(response = @ rahgiri))
END
消息错误:
消息2716,等级16 ,状态1,过程returnrahgiri,第1行
列,参数或变量#0:无法在数据类型文本上指定列宽。
我怎么能解决这个问题???
解决方案
hi,i want to create this funcion but sql not allowed, 这篇关于函数返回文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
create FUNCTION returnrahgiri(@rahgiri text)
RETURNS text
as
BEGIN
return (Select response from work_with_us where (response=@rahgiri))
END
message error:
Msg 2716, Level 16, State 1, Procedure returnrahgiri, Line 1
Column, parameter, or variable #0: Cannot specify a column width on data type text.
how i can fix this problem??? 解决方案 With Functions in SQL, you can't use Text, try using VARCHAR(MAX) which works the same way as Text
查看全文