select distinct A.* from A,B where A.id = B.g_id and A.fwzid
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/05/16 00:28:57
select distinct A.* from A,B where A.id = B.g_id and A.fwzid = 2
我那个地方是写的 select distinct A.* from A,B where A.id B.g_id and A.fwzid = 2
好像就会出错,
我那个地方是写的 select distinct A.* from A,B where A.id B.g_id and A.fwzid = 2
好像就会出错,
这样写 distinct A.*,没有这么厉害把,并且在where 那边不想等可以用 not exists
再问: = 于 是没错的。 可是我想用 呢。。 就会有点问题。把所有的记录显示出来,并且重复
再答: 应该不好吧,那是比值把,建议用not exists
再问: 我不会用not exists....求。。
再答: select * from A where id not exists (select g_id from B) and fwzid = 2;不知道行不行,你到网上看看 not exists的用法看看,会有帮助的
再问: 解决了。这样应该可以了 select* from A where id not in(select distinct C.id from A as C,B as D where C.id=D.glry_id) and fwzId =2
再问: = 于 是没错的。 可是我想用 呢。。 就会有点问题。把所有的记录显示出来,并且重复
再答: 应该不好吧,那是比值把,建议用not exists
再问: 我不会用not exists....求。。
再答: select * from A where id not exists (select g_id from B) and fwzid = 2;不知道行不行,你到网上看看 not exists的用法看看,会有帮助的
再问: 解决了。这样应该可以了 select* from A where id not in(select distinct C.id from A as C,B as D where C.id=D.glry_id) and fwzId =2
select distinct A.* from A,B where A.id = B.g_id and A.fwzid
select ** from A where A.id in (select id from B where ****)
sql 中 select * from A left join B on A.id=B.id where A.id=?如
sql如何取交集有这样两条sql语句select distinct id from a where id='123'se
select A,B,C,D=(select count(*) from 表 where c=a.a and b=a.b
delete from A where a_id in (select id from B where b_id in
select A.a,b,c,d from A,B where A.a=B.a and f='1'
select * into b from a where 11
select distinct id from names where tid = 'AREACODE' And dsc
sql函数,select count(A.abc) as sum from A left join B on A.id=
SQL语句理解 select * from B where (select count(1) as num from A
select count(*) from v$process a,v$session b where a.addr =