高手请进,一个空表问题!

ponderlon ponderlon 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
已知: table1, table2,其中table1有数据,table2没有数据,table1和table2没有任何关联。

现在,我想得到的数据是:

当table2.col2='value2'时,得到table2.col1

取得select * from table1 where table1.col1 > table2.col1

问:
我写的sql是:

select *
from table1,table2
where table2.col2='value2'--错误原因
and table1.col1 > table2.col1(+)

但是这个查询是空表。
请问应该怎么写?


...全文

相关推荐

评论 13
收藏 已收藏
分享
返回顶部
ponderlon
Oracle 17,133 成员 55,258 内容