Hello

I'm an SQL newbie, and would like to know how to perform the following
INSERT's:

=====
BEGIN;
INSERT INTO customers (id,name) VALUES (NULL,'John Doe');
;How to get ROW_ID?
INSERT INTO phones (tel,id_customers) VALUES ('1234567',ROW_ID);
COMMIT;
=====

The two records are linked, since a customer may have more than one
phone number, so I need to know the ID set by SQLite to the record in
table "customers", so I can refer to it in the second INSERT (where
ROW_ID stands).

Thank you.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to