2. instr用法

Posted on 2017-03-28 14:35  zkx4213  阅读(149)  评论(0编辑  收藏  举报

跟oracle中的instr用法一样:

SQL> select count(*) from t where instr(title,‟oracle‟)>0; COUNT(*) ———- 5478 
Elapsed: 00:00:11.04 


SQL> select count(*) from t where title like ”%oracle%‟; COUNT(*) ———- 5478 
Elapsed: 00:00:31.47

注: 
instr(title,'oracle‟)>0 相当于like 

instr(title,'oracle‟)=0 相当于not like

Copyright © 2024 zkx4213
Powered by .NET 8.0 on Kubernetes