Code example for ResultSet

Methods: getMetaData

0
            assertFalse(conn.getAutoCommit()); 
            String query = "select * from zoo";
            st = conn.createStatement();
            st.execute(query);
            rs = st.getResultSet();
            rsmd = rs.getMetaData();
        } catch (SQLException e) {
            fail("Couldn't get ResultSetMetaData object"); 
        } 
    } 
 
    @Override 
    public void tearDown() throws SQLException { 
        try { 
            rs.close();
            st.close();
        } catch (SQLException e) {
            fail("Couldn't close Statement object"); 
        } 
        super.tearDown(); 
    }