select w.* from table_a w where instr(w.price,11)>0
select w.* from table_a w where instr(w.price,11)>0 or instr(w.price,14.76)>0
--匹配: SQL> with t as( 2 select 1 col_1,1256 col_2 from dual union all 3 select 2,11 from dual union all 4 select 3,14.76 from dual union all 5 select 4,114.7698 from dual union all 6 select 5,1111.0011 from dual 7 ) 8 select * from t 9 where col_2 like '%11%' or 10 col_2 like '%14.76%' 11 / COL_1 COL_2 ---------- ---------- 2 11 3 14.76 4 114.7698 5 1111.0011
SQL> with t as( 2 select 1 col_1,14117 col_2 from dual union all 3 select 2,1714.768 from dual union all 4 select 3,840 from dual union all 5 select 4,790 from dual union all 6 select 5,113.67 from dual union all 7 select 6,67.6 from dual 8 ) 9 select * from t 10 where col_2 like '%11%' or 11 col_2 like '%14.76%' 12 / COL_1 COL_2 ---------- ---------- 1 14117 2 1714.768 5 113.67
select w.*
from table_a w
where instr(w.price,11)>0
select w.*
from table_a w
where instr(w.price,11)>0
or instr(w.price,14.76)>0
--匹配:
SQL> with t as(
2 select 1 col_1,1256 col_2 from dual union all
3 select 2,11 from dual union all
4 select 3,14.76 from dual union all
5 select 4,114.7698 from dual union all
6 select 5,1111.0011 from dual
7 )
8 select * from t
9 where col_2 like '%11%' or
10 col_2 like '%14.76%'
11 / COL_1 COL_2
---------- ----------
2 11
3 14.76
4 114.7698
5 1111.0011
SQL> with t as(
2 select 1 col_1,14117 col_2 from dual union all
3 select 2,1714.768 from dual union all
4 select 3,840 from dual union all
5 select 4,790 from dual union all
6 select 5,113.67 from dual union all
7 select 6,67.6 from dual
8 )
9 select * from t
10 where col_2 like '%11%' or
11 col_2 like '%14.76%'
12 / COL_1 COL_2
---------- ----------
1 14117
2 1714.768
5 113.67