SQL语句理解 select * from B where (select count(1) as num from A
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/03 23:00:13
SQL语句理解 select * from B where (select count(1) as num from A where A.ID = B.ID) = 0
select * from B where (select count(1) as num from A where A.ID = B.ID) = 0
请问如何理解,为什么 可以在B表中 排除A表的数据
select * from B where (select count(1) as num from A where A.ID = B.ID) = 0
请问如何理解,为什么 可以在B表中 排除A表的数据
子查询中select count(1) as num from A where A.ID = B.ID
就是统计B表和A表用ID连接的行数
子查询的行数=0,就可以实现从B表中排除A表数据
再问: 子查询只是把计数传过去啊 主查询如何得知具体数据行?
再答: nono, 这么看: select * from B where ?= 0 where中条件其实是,什么等于0? 代入 (select count(1) as num from A where A.ID = B.ID) 就是A和B通过ID连接后,COUNT(*)计数=0
再问: select count(1) as num from A where A.ID = B.ID 不等于0啊
就是统计B表和A表用ID连接的行数
子查询的行数=0,就可以实现从B表中排除A表数据
再问: 子查询只是把计数传过去啊 主查询如何得知具体数据行?
再答: nono, 这么看: select * from B where ?= 0 where中条件其实是,什么等于0? 代入 (select count(1) as num from A where A.ID = B.ID) 就是A和B通过ID连接后,COUNT(*)计数=0
再问: select count(1) as num from A where A.ID = B.ID 不等于0啊
SQL语句理解 select * from B where (select count(1) as num from A
ms sql :select * from (select *from b) as xxx where 和 select
SQL 语句 "SELECT * FROM {{table}} WHERE `fleet_end_time`
select count(*) as total from ddcm_news where key=a
SQL >select count(*) from Teacher where teacherCode=? and te
$sql="SELECT count(*) as pcount FROM news" 和$sql = "UPDATE a
sql函数,select count(A.abc) as sum from A left join B on A.id=
select count(1) from emp
select A,B,C,D=(select count(*) from 表 where c=a.a and b=a.b
select count(c) from (select b from TUserBankLogSum b group
String sql = "select * from tb_consumer where account='" + a
select * into b from a where 11