select distinct A.* from A,B where A.id = B.g-id and A.fwzid

学习 时间:2026-04-02 09:06:01 阅读:1741
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 好像就会出错,

最佳回答

等待的心锁

寒冷的小鸭子

2026-04-02 09:06:01

这样写 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

最新回答共有2条回答

  • 爱撒娇的路灯
    回复
    2026-04-02 09:06:01

    这样写 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

上一篇 爱情公寓最后一句英语什么意思

下一篇 《父亲挑书》在文中,在问中画出对父亲外貌描写的句子,并说说这些句子的表达作用.