欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

SELECT 语句模式

程序员文章站 2022-05-01 12:53:04
...
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
    )