SQLServer(MSSQL)で変数宣言。

毎回忘れてしまうのでメモ。

DECLARE @p int = -1
SELECT * FROM Products WHERE Code = @p

DECLARE @local_variable (Transact-SQL)