我一直在試圖聲明一個整數變量,但它只是不工作。這裏是我的查詢:無法聲明變量SQL
DECLARE @count INT
SET @count = 5633
SELECT count(matchid)
FROM `matches`
WHERE id = @count
即時得到這個錯誤:
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @count INT
SET @count = 5633
請幫助:)
請記住**接受**您發現最有用的答案。歡迎來到Stackoverflow! –