Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does one get column names for rows returned in a ResultSet?

0
Posted

How does one get column names for rows returned in a ResultSet?

0

Location: http://www.jguru.com/faq/view.jsp?EID=524526 Created: Oct 18, 2001 Modified: 2002-03-23 22:59:11.612 Author: Jason Stell (http://www.jguru.com/guru/viewbio.jsp?EID=50780) Question originally posed by Maxim Markaitis (http://www.jguru.com/guru/viewbio.jsp?EID=521563 ResultSet rs = … … ResultSetMetaData rsmd = rs.getMetaData(); int numCols = rsmd.getColumnCount(); for (int i = 1; i <= numCols; i++) { System.out.println("[" + i + "]" + rsmd.getColumnName(i) + " {" + rsmd.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123