"A. Pagaltzis" <[EMAIL PROTECTED]> wrote:

> It's a pity that INSERT OR IGNORE (apparently?) does not set
> last_insert_id properly regardless of outcome,

Consider this case:

  CREATE TABLE t1(x INTEGER PRIMARY KEY, y UNIQUE, z UNIQUE);
  INSERT INTO t1 VALUES(1,'a','b');
  INSERT INTO t1 VALUES(2,'x','y');

  INSERT OR IGNORE INTO t1 VALUES(NULL, 'a','y');

For the INSERT OR IGNORE statement, does the last_insert_rowid
get set to 1 or 2?

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to