0
以下來自類似問題的各種示例在這裏,我試圖在單聲道中使用sqlite的upsert。Sqlite單聲道upsert
string query = string.Format(@"
UPDATE {0} SET [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] WHERE [email protected];
INSERT INTO {0} (key, data, protoent, posX, posY, posZ, ownerpubkey) VALUES (@key, @data, @protoent, @pX, @pY, @pZ, @ownerpubkey) WHERE changes() = 0;
", PersistEntityRecord.TableName);
出於某種原因,我得到一個例外,因爲它似乎並不像INSERT線
Exception thrown: 'Mono.Data.Sqlite.SqliteException' in Mono.Data.Sqlite.dll
Additional information: SQLite error
near "WHERE": syntax error
的WHERE部分如果我卸下INSERT行的WHERE,它運行。我不知道爲什麼它不會那樣。
SqliteConnection.SQLiteVersion報告版本3.11.0是否有幫助
感謝