This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Say I have one table EMP and other DEPT both are having auto generated primary key , and DEPT key keep EMP's promary key as a foreign key.
Now what is the best JDBC flow, if some onw wnat to insert emp info and dept infor together. so flow is first it will insert EMP details and new row generate a primary key, I will pick up this primary by another JDBC call, and again inset it into DPET table with dept details, and another JDBC call. That means there are total three Databse call!! Please advice any toher efficient flow.