private void printTable() throws SQLException {
        rs = st.executeQuery("SELECT  * FROM products");
        ResultSetMetaData rsMetaData = rs.getMetaData();
        System.out.print("Row\t|\t");
        for (int i = 0; i < rsMetaData.getColumnCount(); i++) {
            System.out.print(rsMetaData.getColumnName(i + 1) + "\t|\t");
        }
        System.out.println();
        if (rs == null) {
            System.out.println("Null resultset");
            return;
        }
        while (rs.next()) {
            System.out.println(rs.getRow() + ".\t|\t" + rs.getInt(1) + "\t|\t" + rs.getString(2)+ "\t\t|");
        }
        System.out.println("_________________________");
    }