Seo Forum

Coding & Programming => JavaScript Forum => Topic started by: varnishakalra on 08-22-2019, 00:25:30

Title: JAVA DUPLICATION TABLE
Post by: varnishakalra on 08-22-2019, 00:25:30
public class MultiplicationTable {
    public static void main(String[] args) {
        int num = 5;
        for(int i = 1; i <= 10; ++i)
        {
            System.out.printf("%d * %d = %d \n", num, i, num * i);
        }
    }
}




is it right duplication table or not?
Title: Re: JAVA DUPLICATION TABLE
Post by: brookeroberts7 on 08-27-2020, 05:35:28
Connection connection1 = // set up connection to dbms1
Statement statement = connection1.createStatement();
ResultSet result = statement.executeQuery("select * from ............. ");

Connection connection2 =  // set up connection to dbms2
// Now I want to upload the ResultSet result into the second database
Statement statement2 = connection2.createStatement("insert into table2 " + result);
statement2.executeUpdate();