认证0级讲师
Why can’t we judge the two query variables before executing the SQL statement?
The pseudo code is as follows:
if (isNull(a)) { a = ''; } if (isNull(b)) { b = ''; }
From the perspective of efficiency, it is strongly recommended that when name or method is empty, the value will not be used as a query conditionFor example, if name is empty, it is directlywhere method like '%xxx%'
where method like '%xxx%'
Why can’t we judge the two query variables before executing the SQL statement?
The pseudo code is as follows:
From the perspective of efficiency, it is strongly recommended that when name or method is empty, the value will not be used as a query condition
For example, if name is empty, it is directly
where method like '%xxx%'