I want to count records of query. The problem is that the query is not constant.
I write something like this, but this is only almost good
select count(*) from (select * from users);
where the select * from users is only example
I think something about this:
String query = "select * from users";
String queryCount = "select count(*) from (" + query + ")";
This is not correct as in mysql query they wrote an error like this:
ERROR 1248 (42000): Every derived table must have its own alias
What is the correct command for that?