tags:

views:

82

answers:

3

I want to get two separate tables by executing one query in MySQL. If you know how, please reply.

+1  A: 

I don't think you can do that because there isn't really a way to retrieve two different datasets from one query. Nor do I know why you would want to do this.

Joe Philllips
actually I try to created dynamic rows in PDF by using Jasper report.In pdf i print two table for that i want to print two table by single query
vipul
UNION the tables together? We really don't have enough information
Joe Philllips
A: 

No enough information,if you want to produce two datasets its possible using a stored procedure which will split the data from your table and insert into two temporary tables,thats my take on it,but if you supply some more information maybe we can get a clear scope of your problem

indago
+2  A: 

You should simply perform a join on the database.

table_reference STRAIGHT_JOIN table_factor ON conditional_expr

http://dev.mysql.com/doc/refman/5.0/en/join.html

GRRRRAAAVVVYYYYY