2

Here is the code that will help you understand my question:

select * 
from table1
where ((((field1=value1 and field2=value2) or field3=value3) and field4=value4) or field5=value5) ...

The Parse Tree are composed of and or. Is there a nesting limit for Parse Tree in MySQL?

DanielJyc
  • 743
  • 1
  • 5
  • 12
  • Related: https://stackoverflow.com/questions/1532366/mysql-number-of-items-within-in-clause – Tim Biegeleisen Aug 20 '17 at 03:42
  • 1
    If there be a limit my guess is that you won't hit it, at least not querying a single table. If you really have that many columns in a single table, then you have another probably bigger design problem. – Tim Biegeleisen Aug 20 '17 at 03:43
  • @TimBiegeleisen 1. There are not so many columns. Like this: `where (field1=v1_1 or (field1=v1_2 and field2=v2_1 and(field1=v1_3 and field3=v3_1)) )` 2. It is used for `Data Analysis`. The query conditions is defined by user so I need nesting limit. – DanielJyc Aug 20 '17 at 04:09

0 Answers0