【发布时间】:2011-12-26 04:32:59
【问题描述】:
我一直在尝试声明一个整数变量,但它不起作用。这是我的查询:
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!
标签: mysql sql variables declare