Get ID of Recently Insterted Record
Posted on 2004-08-31
I have a table called 'payment' which has it's own ID pay_ID. I also have a table called 'payment_cash' which also holds the pay_ID and referential integrity is enforced with the 'payment' table. I insert a record into the payment table, and then I need to insert a record into the 'payment_cash' table. I need to get the pay_ID (which is an automunber) of the record i just inserted into the 'payment' table so that i can use it to insert into the 'payment_cash' table.
Hope that made sense