You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Uma Maheswar <um...@hotmail.com> on 2002/02/12 07:38:10 UTC
Getting values from different tables
Hi,
I wanted to know if there is any possiblility of getting all the values from a Database in a single command.
Example:
I am using it in this way in a browser "select * from "and here is a drop down box which contains table names" as register,pc,signup" . I select the table I need from the drop down box and hit the submit button. and I should get all the values from the database in a table. The problem is I do not have all the fields in all the databases same. Then how are we going to get the result.
String tables = req.getParameter("tables");
rs = st.executeQuery("select * from '"+tables+"' ");
while(rs.next()
{
??????????
}
Help me.
Uma