'varchar' is not a recognized CURSOR option
在复习一些基本的SQL时候,遇到这样的Error:'varchar' is not a recognized CURSOR option.
一时没搞明白怎么回事,google了下,有的说输出空格特殊字符要加[]...
后来才知道到原因: 由原来是在声明变量@rowprint时候,漏掉了变量标识@
declare @row int;
Select @row=COUNT(*) From Platform
--print @row;
Declare @rowchar char(2);
Select @rowchar=convert(char(2),@row)
declare @rowprint varchar(100);
select @rowprint='There are '+@rowchar+' rows in table Platform.'
Print @rowprint
记载此处,给遇到相同问题的朋友参考,也给自己加深下印象,不在犯类似的错误。
编辑器加载中...
Be the change you want to see in the world.