我一直在试图声明一个整数变量,但它只是不工作。这里是我的查询:无法声明变量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! –