Upsert in SQLite3

INSERT OR REPLACE INTO Employee (id, role, name) 
  VALUES (  1, 
            'code monkey',
            (SELECT name FROM Employee WHERE id = 1)
          );

ref: https://stackoverflow.com/questions/418898/sqlite-upsert-not-insert-or-replace

你可能感兴趣的:(Upsert in SQLite3)