INSERT INTO saved_locations (CharacterID, Index, MapleID)
VALUES ('10', '0', '100020000')
错误是:
MySql.Data.MySqlClient.MySqlException (0x80004005:
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 'Index, MapleID) VALUES ('10', '0', '100020000')' at line 1
为什么我会收到错误?这太奇怪了。我的桌子很好。
答案 0 :(得分:5)
Index
是保留字。你需要引用它:
INSERT INTO saved_locations (CharacterID, `Index`, MapleID)
VALUES ('10', '0', '100020000')