如题。有个数值型字段,想搜素这个字段中包含某个数值(如11或14.76)的所有记录,请问如何实现?
解决方案 »
- Linux下C语言使用Oracle
- 为什么这句话不输出查询结果
- 視圖創建失敗:ORA-01027: 不可在資料定義作業中使用連結變數
- 请教各位高手,如何用proc编译多个文件?
- 行列转换--合并__ORACLEK中运行
- **** 怎样用Oracle10g中的 C++开发包oo4o中的函数 来得到表中最后一行的ID号,三天内结贴!高分相送!
- 怎样学习ORACLE?
- 急急急---ORACLE数据库查询速度变慢的原因是什么?100分
- 怎么在oracle xmltype里添加属性?用oracle 自带函数?求解答
- oracle 性能问题
- 谁能帮我优化下这个SQL语句
- 菜鸟问题:11g R2 X64 for windows,如何创建用户?有答案后马上给分!
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