版权声明: https://blog.csdn.net/qq_35193093/article/details/88394340
在测试程序的时候发现sql查询语句超过范围
检查sql语句发现原语句:select xx from xx where a=b and c=d or e=f;
预期的结果是满足a=b的同时c=d或者e=f,忘记加括号导致范围超限
加括号后select xx from xx where a=b and (c=d or e=f);
在测试程序的时候发现sql查询语句超过范围
检查sql语句发现原语句:select xx from xx where a=b and c=d or e=f;
预期的结果是满足a=b的同时c=d或者e=f,忘记加括号导致范围超限
加括号后select xx from xx where a=b and (c=d or e=f);