为什么sql代码显示swiggly red line [英] Why does sql code show swiggly red line

查看:36
本文介绍了为什么sql代码显示swiggly red line的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么会显示错误,



要求我声明@roleID参数或变量尽管我已经确认了



这是我的代码: -



Why is this showing error,

asks me declare the @roleID parameter or variable Even though I did already

Here is my code:-

DECLARE @User VARCHAR(200)
SET @User = '1,3'
declare @roleID int
set @roleid=2
insert into userrole values((Select * from dbo.CSVToTable(@User) as UserID ,@roleID)





请帮助



Please help

推荐答案

declare @roleID int



声明是大写和小写,但你使用上述变量:


The declaration is in upper and lower case, but your usage of said variable:

set @roleid=2



是全部小写。你应该修改它来阅读:




is all lower case. You should fix that to read:

set @roleID=2





来匹配变量的声明。



干杯!



to match the declaration of the variable.

Cheers!


这篇关于为什么sql代码显示swiggly red line的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆