i am migrating from ms access database to mysql database with java frontend so that my application can be used in linux as well .
in ms access here's what i would do
go to create query . write a select statement . call give the name of the query as query1.
when double clicking on query1 you would get the result of select statement in a tabular form.
next i would write a query2 which is also a select query. this query would be fetching data not from a table but query1 e.g select a,b from query1;
now i am on a mysql database using java what would be the java statement for select a,b from query1 ?
what i mean to say is that i would connect to mysql using jdbc. have query1 like this
string query1 = " select * from users " ;
then execute query using executeQuery(query1)
but i dont think i can do something like this.
string query2 = " select a,b from query1 " ;
and then executeQuery(query2)
so what is the way out ?