天天看點

sql2005與sql2008存儲過程中 變量使用的一處差別

sql2008 declare @aa int =100

sql2005中會提示錯誤 ”不能向局部變量賦予預設值。“

解決方法:

declare @aa int

set @aa=100