我找到了我搜索的 SQL 来更新一些字段,但我得到了标题的错误:
UPDATE a
SET a.json = 'ex', a.last_save = 'ex', a.carte = 'ex'
FROM partie_l AS a
INNER JOIN carte AS b
ON a.start_carte = b.hash
WHERE b.json = 'ex' AND a.start_joueurs = 'ex' AND a.param = 'ex'
我已经用 ex 替换了我的数据,否则它会太长。
这是我的表格的结构。
CREATE TABLE "carte" ("hash" TEXT NOT NULL PRIMARY KEY ,"json" TEXT NOT NULL ,"nb_jrs" INTEGER,"preview" BLOB, "creator" TEXT DEFAULT atoll, "name" TEXT, "tetra" BOOL)
CREATE TABLE "partie_l" ("id" INTEGER PRIMARY KEY NOT NULL ,"json" TEXT,"create" DATETIME,"last_save" DATETIME,"start_carte" TEXT,"preview" BLOB,"param" TEXT,"start_joueurs" TEXT,"carte" TEXT, "name" TEXT)
编辑:Sqlite 不支持内连接