- 博客(1)
- 收藏
- 关注
原创 SQL 中的 EXISTS 和 NOT EXISTS
exists(select * from subdbm.score tt where t.s_id=tt.s_id) 这个意思就是 t.sid 的这8个号 如果能和tt.sid 能对应上的,就会当作 select t.s_id,t.s_name from subdbm.student t where t.s_sex='男' and 这个语句的一个条件。也就是t.s_id=01 和 07 08 加到过滤条件 男生只有01所以会输出01。两个表 t.s_id = tt.s_id。
2023-08-04 12:03:52
742
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人