with a as (
select 1 id,'S12abc' name from dual
union all
select 2 id,'aS13abfc' name from dual
union all
select 3 id,'S15abc' name from dual
union all
select 4 id,'1S14abc' name from dual),b as(
select 'S12' xh from dual
union all
select 'S13' xh from dual
union all
select 'S14' xh from dual
)
select *
from (select a.id, (select b.xh from b where instr(a.name, b.xh) > 0) xh
from a)
where xh is not null
select 1 id,'S12abc' name from dual
union all
select 2 id,'aS13abfc' name from dual
union all
select 3 id,'S15abc' name from dual
union all
select 4 id,'1S14abc' name from dual),b as(
select 'S12' xh from dual
union all
select 'S13' xh from dual
union all
select 'S14' xh from dual
)
select *
from (select a.id, (select b.xh from b where instr(a.name, b.xh) > 0) xh
from a)
where xh is not null
解决方案 »
- 表空间不存在,数据库文件被rm,怎么处理
- 还是那个分组后分组求和比较的问题!
- oracle8.1.7灾难恢复
- oracle 数据库 连接局域网中的SQL server 的问题,在线等!!!!
- 存储过程-形参为out模式的传值与传引用的区别
- 重装oracle后恢复数据库遇到的许多问题,请高手们帮帮忙
- oracle怎样建库?不用助手,手工建库,求建库脚本
- 不小心,大错误,数据库打不开了,
- 在删除一个表之前来判断表是否存在?
- 多个版本的ORACLE可不可以在同一个操作系统中共存啊?(WINNT)
- Oracle中是否有类似SQL Server中SQL Server Profile的工具
- 小白问一下oracle关于列的domain/policy是什么……
(select 1 id, 'S12abc' name
from dual
union all
select 2 id, 'S13asdf' name
from dual
union all
select 3 id, 'S14asdf' name
from dual
union all
select 4 id, '1S15abc' name from dual),
b as
(select 'S12' xh
from dual
union all
select 'S13' xh
from dual
union all
select 'S15' xh from dual)
select a.id, b.xh from a, b where a.name like '%' || b.xh || '%';