MrCBofBCinTX
Technical User
I'm trying to add a new customer to a PostgreSQL table, customers. Since many customers have multiple jobsite addresses, often different from billing addresses, I want to go ahead and force adding a jobsite set of info at same time.
Problem is, I have set up jobsite table to depend on foreign key integer cust_id, which I won't know until after successfully adding new customer, but then I have no way (that I can see) to get this new value automatically.
Am I missing something obvious here? Is there a way to get this newly created cust_id value during insert process to customers table?
Problem is, I have set up jobsite table to depend on foreign key integer cust_id, which I won't know until after successfully adding new customer, but then I have no way (that I can see) to get this new value automatically.
Am I missing something obvious here? Is there a way to get this newly created cust_id value during insert process to customers table?