select a.* from t_magazine a where a.is_del=0 and not exists (
select 1 from t_magazine b where b.is_examine in (0,2) and b.is_del=0
and a.id=b.id
)
该句的意思是查询不存在 子查询的记录 select 1 表示真假,其实不是很明白
本文详细解析了一个SQL查询语句,其目的是筛选出在杂志数据库中,既未被删除也未处于审核状态的记录,通过使用内连接和条件过滤来实现这一目标。
select a.* from t_magazine a where a.is_del=0 and not exists (
select 1 from t_magazine b where b.is_examine in (0,2) and b.is_del=0
and a.id=b.id
)
该句的意思是查询不存在 子查询的记录 select 1 表示真假,其实不是很明白

被折叠的 条评论
为什么被折叠?