Wednesday, 18 September 2013

inner join-where-order by-limit in mysql

inner join-where-order by-limit in mysql

When I am executing mysql query with limit 0,50 . I am getting 50 rows.
SELECT md.*,cl.country_name FROM master_detail md
INNER JOIN country_list cl on cl.country_value=md.Partner_value
where md.for_country_value='577' order by md.id LIMIT 0,50
But When I am executing mysql query with limit 50,100 . I am getting 100
rows.
SELECT md.*,cl.country_name FROM master_detail md
INNER JOIN country_list cl on cl.country_value=md.Partner_value
where md.for_country_value='577' order by md.id LIMIT 50,100
It might be problem due to inner join? Actually I want data on the basis
of limit but how I dont know?

No comments:

Post a Comment