【发布时间】:2019-04-10 15:29:42
【问题描述】:
我已经在下面运行了选择:
select replace(replace(id,'[',''),']','') as ID from tableA where COL1= 'TEST';
它返回 15 行。
example of id:
1abc
3def
9abc
..
..
..
14abc
然后我将这个 ID 查找到其他表中:
select col1, col3 from tableB where
id in (select replace(replace(id,'[',''),']','') from tableA where COL1= 'TEST');
它返回 12 行。
1abc city1
2def city2
5abc city2
.. ..
12abc city3
如何显示缺失的 3 行?
【问题讨论】:
-
添加一些说明问题的示例表数据 - 作为格式化文本,而不是图像。随意最小化,也许是 4 和 3 行而不是 15 和 12 行。
标签: sql oracle replace oracle12c contains