给SqlParameter参数指定或不指定:@变量标识符的区别是什么?

对于sql语句中一个@的参数@au_id,在sqlParameter中,可以用@au_id,也可以用au_id。

要是bt点的,用两个@,你就不能随便省略@了。

对于sql语句 : select * from authors where au_id=@@au_id
在SqlParameter中,也只能用@@au_id,而不能是@au_id,或au_id。

原文地址:https://www.cnblogs.com/password1/p/5498840.html