After attaching the second database I tried to insert and update data in the table of the first database using ON CONFLICT(id) DO UPDATE. Field id is the primary key for the first table.
FDQuery1.EXECSQL('ATTACH ''D:\Update2019.DB'' AS DBUpdate');
FDQuery1.SQL.Text:=
'INSERT INTO acts (id,title) SELECT id,title FROM DBUpdate.acts'+
' WHERE (DBUpdate.acts.id >100)'+
' ON CONFLICT(id) DO UPDATE SET'+
' title=excluded.title;'
FDQuery1.ExecSQL;
I get error message: "ERROR near "ON":syntax error" When I removed WHERE (DBUpdate.acts.id >100 condition the error message AS: "ERROR near "DO":syntax error".
The same query works fine in SQLITESTUDIO.