我一直在尝试声明一个整数变量,但是它就是不起作用。这是我的查询:
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
请帮忙:)