Heim >Datenbank >MySQL-Tutorial >SELECT 语句模式
SELECT命令其实很简单,也很常用,但代码阅读经常为coder造成困扰; 其实用一种标准格式书写可以减低困扰的强度 无 SELECT field1, field2, ...FROM table1 aJOIN table2 b on 1=1 AND join_condition1 AND join_condition2..WHERE 1=1AND filter_condition1A
SELECT 命令其实很简单,也很常用,但代码阅读经常为coder造成困扰;SELECT field1, field2, ... FROM table1 a JOIN table2 b on 1=1 AND join_condition1 AND join_condition2 .. WHERE 1=1 AND filter_condition1 AND filter_condition1 AND (1=2 or filter_condition_sub1 or filter_condition_sub2 )