Get the App
SLTechnology News&Howtos  ›  Database  › 

How to replace like with instr function in Oracle

Shulou Source: shulou.com Published: 2022-05-31 14:15:34 10月11日 Update

This article introduces how Oracle uses instr function to replace like, the content is very detailed, interested friends can refer to it, I hope it can help you.

Using instr function of Oracle to cooperate with index to improve efficiency of fuzzy query

Generally speaking, in Oracle database, we will use the following two ways to perform fuzzy queries on the name field of tb table:

1.select * from tb where name like '%XX%';

2.select * from tb where instr(name,'XX')>0;

-----------------------------------------------------------------------------------------------------------------------------------------------------

instr(title,'Oracle')>0 Equivalent to title like '%Oracle%'

instr(title,'Oracle')=0 equates to title not like '%Oracle%'

About Oracle how to use instr function instead of like to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Tags: Functions content more help query yes generally speaking interests fields guys buddies efficiency data databases articles methods knowledge articles indexes references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Apple MariaDB Microsoft Redmi