I need to take a table from one database and upload it to a different database. So, I create two separate connection . Here is my code
Connection connectio
If you don't want to manually list out all the field names for every table in the database, you should be able to do this two-step process instead:
resultSet.getMetaData() to get the list of fields, and use that to drive a modified version of the SELECT/INSERT code in @Wyzard's answer.I will post code here if I get it working.