Want to put MySql limit on each where condition -


i want refine mysql condition putting limit on each parameter.

current query

select * product  name "%abc%" or name "%xyz%"  limit 50 

i got result having 50 rows both condition. want result on base of each condition such as

select * product  name "%abc%"  limit 50   select * product  name "%xyz%"  limit 50 

i want wrap both above queries in 1 got 50 records first query , 50 next one.

you can try use union all

select * product  name "%abc%"  limit 50  union  select * product  name "%xyz%"  limit 50 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -