我有這個疑問:SQL查詢無法找到的錯誤
DECLARE @i int = 0
WHILE @i < 100 BEGIN
SET @i = @i + 1
INSERT INTO lottery (ticket, bought) VALUES (@i, false)
END
MySQL服務器
Error: 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 @i int = 0 WHILE @i < 100 BEGIN
SET @i = @i + 1 INSERT INTO lott' at line 1
但它說的錯誤是,但不是哪裏。 我做錯了什麼?