1、多表联查
SELECT
p.*, c.*, pc.*
FROM
user AS p
LEFT JOIN post AS c ON c.post_id = p.id
LEFT JOIN category AS pc ON c.category_id = pc.id
WHERE
pc.path LIKE "星%";
2、单表多条件查询
SELECT *
FROM
for_*
WHERE
parent_id = 79 and delete_time = 0 and status = 1;
3、单表查询限定条数
select * from articles where category_id = 10 limit 1,20;