oracle clob类型字段查询方法
2013-11-21 13:38
609 查看
今天要查询clob类型字段为空的记录。颇费一番周折才找到一个方法,记录以供参考。
select s.testcaseid from b_t_testcasestepinfo s where pjid = '2013WARD120006'
and actorphase = 1
and not (s.stepid = 1 and s.stepaction6 not like '%') and s.stepresult6 not like '%';
注:
1、stepaction6为clob类型。
2、该脚本在PLSQL developer工具上执行报错,在Oracle SQL Developer上可以执行。
3、直接s.stepresult6 like ''不能查询到想要的结果
看到一些关于此类查询的文章, 推荐建立oracle全文索引,再使用contains函数,效率是更高的。
参考文章如下:
http://www.iteye.com/problems/64807
http://blog.csdn.net/pathuang68/article/details/4093665
select s.testcaseid from b_t_testcasestepinfo s where pjid = '2013WARD120006'
and actorphase = 1
and not (s.stepid = 1 and s.stepaction6 not like '%') and s.stepresult6 not like '%';
注:
1、stepaction6为clob类型。
2、该脚本在PLSQL developer工具上执行报错,在Oracle SQL Developer上可以执行。
3、直接s.stepresult6 like ''不能查询到想要的结果
看到一些关于此类查询的文章, 推荐建立oracle全文索引,再使用contains函数,效率是更高的。
参考文章如下:
http://www.iteye.com/problems/64807
http://blog.csdn.net/pathuang68/article/details/4093665
相关文章推荐
- Java 存储和读取 oracle CLOB 类型字段的实用方法
- Java 存储和读取 oracle CLOB 类型字段的实用方法
- Oracle中如何查询CLOB字段类型的内容
- Java 存储和读取 oracle CLOB 类型字段的实用方法
- Oracle中如何查询CLOB字段类型的内容
- Oracle大字段(clob)模糊查询优化方法
- Oracle 将普通字段类型改为Clob类型的方法
- Oracle查询CLOB字段类型的内容
- Oracle查询CLOB字段类型的内容
- oracle CLOB类型超过4000个字段sql插入方法
- Oracle中如何查询CLOB字段类型的内容
- Oracle 将普通字段类型改为Clob类型的方法
- Java 存储和读取 oracle CLOB 类型字段的实用方法
- Oracle clob类型的字段作为查询条件的sql语句写法
- 关于oracle中clob字段查询慢的问题及解决方法
- oracle中修改已有字段数据类型为clob的方法以及ssh框架中如何保存clob字段
- Oracle中如何查询CLOB字段类型的内容
- oracle 查询表的结构和字段类型,字段长度
- Java 存储和读取 oracle CLOB 类型字段(转)
- Oracle 查询表字段属性的方法