<% String query="select column1, column2 from table1"; ResultSet rs=mydb.executeQuery(query); while(rs.next()){%>" ><%=rs.getString("column2")%><% } rs.close();%>
select [columnname], .....