sql 如何以两个列的值作为查询条件
答案:2 悬赏:40
解决时间 2021-02-08 02:06
- 提问者网友:我喜歡係
- 2021-02-07 15:42
sql 如何以两个列的值作为查询条件
最佳答案
- 二级知识专家网友:深街酒徒
- 2021-02-07 16:38
select * from 表1
where exists (select 1 from 表2 where (表1.id=表2.w_id or 表1.id=表2.m_id) and ....)
where exists (select 1 from 表2 where (表1.id=表2.w_id or 表1.id=表2.m_id) and ....)
全部回答
- 1楼网友:飘零作归宿
- 2021-02-07 16:51
这个貌似没有办法吧,你只有把a/b换成上面的公式
sum(case when name=a then fee else 0 end)/ sum(case when name=a then rc else 0 end)
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯