欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

sqlserver the name is not a valid identifier error in function

程序员文章站 2022-10-25 18:10:25
参考资料:https://*.com/questions/22008859/the-name-is-not-a-valid-identifier-error-in-function 执行存储过程中sql字符串: ......

参考资料:

执行存储过程中sql字符串:

set @name = 'select username from [' + @dbname + '].dbo.users where userid=' + convert(varchar, @userid)  
exec(@name)