[SQL ] MySQL 語法問題
今天寫了兩行簡單的SQL,
結果一直傳回錯誤,
請教大家該如何改寫。
原SQL:
set @y=(SELECT COUNT(*)+1 FROM ABC);
ALTER TABLE ABC AUTO_INCREMENT = @y;
錯誤訊息
#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
'@y' at line 1
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.34.85.231
推
09/25 20:51, , 1F
09/25 20:51, 1F
→
09/26 20:48, , 2F
09/26 20:48, 2F