1、不支持&&、||等操作符 ,用 and、or代替
错误提示如下图:
2、When declare variable type is "varchar", if not define length then default length is 1
ex:
DECLARE
@query VARCHAR
the variable "@query" length is 1
3、declare variable 区分大小写
例如:@query 不同于 @QUERY
本文介绍了在SQL中声明变量时需要注意的几点事项,包括不支持的符号替代方案、未指定长度时默认的变量长度以及变量名大小写的敏感性。
1、不支持&&、||等操作符 ,用 and、or代替
错误提示如下图:
2、When declare variable type is "varchar", if not define length then default length is 1
ex:
DECLARE
@query VARCHAR
the variable "@query" length is 1
3、declare variable 区分大小写
例如:@query 不同于 @QUERY

被折叠的 条评论
为什么被折叠?