达仁堂软件基地:打造最安全放心的免费绿色软件360极速体育nba直播吧_nba百事通极速体育_nba直播 jrs站!

SQL语句中的一些特殊参数如何用变量来代替

2019-11-24来源:
可以采用exec方法declare @tempStr varchar(350)select @tempStr='Update weekcount set ['+convert(varchar,@wee
可以采用exec方法declare @tempStr varchar(350)select @tempStr='Update weekcount set ['+convert(varchar,@week)+']=['+convert(varchar,@week)+']+1 where userid='''+replace(@user,'''','''''')+''''exec(@tempStr)注意: 使exec不能返回一些变量的值,而且当前的变量值在exec的语句里无效.

热门文章