How can we get Last insert ID, if this ID is to be used in other child table.
The inserted values are returned, so if the first field is id then $id will be set as long as you do not use NOVARS, and you can do:
<SQL "insert into Table values(counter, ...)">
<SQL "insert into ChildTable values($id, ...)">
</SQL>
</SQL>