The case is as follows, I have two related tables in postgres, understand
Urbanization and Houses
in Urbanizacion we have the following data
idurb(PK-NoIncremental,varchar)| nombreurb | calle | idcasas(el campo
idcasas es una FK )
and in the other Houses we have the following data
idcasas(PK-NoIncremental-varchar) | numeroCasa | propietario
The problem is this, with INSERT I ordered to fill in first the Casas table which is completely filled by the user, his house number and the name of the owner and the ID of his house, however, I need to relate it to the first table so I need the idcasas q just just created to fill the table with the data idurb, nombreurb and street (q normally fill the user from the form), I also need to enter the id houses that were just created, to be able to relate it between both, I thought that by making normal inserts, the FK that would autocomplete itself, but it was not, is there any query that allows me to obtain a data that was just entered to insert it into another table?
These queries I do from nodeJS and the data I get from a form in angular.