How about this one:
CREATE VIEW vw_lastlab AS SELECT lab_id FROM lab_table WHERE
rowid=last_insert_rowid();

You can fetch the last inserted ID with:
SELECT * FROM vw_lastlab;

HTH

Brandon, Nicholas (UK) schrieb:
how would I go about retriving the id that was assigned to it? I can't
just execute another query such as select lab_id from lab_table where
lab_name = > x because if there are two or more similar lab names, I
have a problem. Thanks.

http://www.sqlite.org/capi3ref.html#sqlite3_last_insert_rowid

Regards
Nick






********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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


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

Reply via email to