REGEXP_INSTR() फ़ंक्शन (MySQL 8.0+)
स्ट्रिंग में उपस्ट्रिंग की स्थिति लौटाता है; 0 = नहीं मिला।
select * from yourTableName where REGEXP_INSTR(yourColumnName, yourSearchValue);
उदाहरण
mysql> create table demo64 (id int not null auto_increment primary key, name varchar(40));
mysql> insert into demo64(name) values('John Smith'), ('John Doe'), ('Chris Brown'), ('David Miller'), ('Carol Taylor');
"John" खोजना
mysql> select * from demo64 where REGEXP_INSTR(name,'John');
+----+------------+ | id | name | +----+------------+ | 1 | John Smith | | 2 | John Doe | +----+------------+
नोट: केस-इनसेंसिटिव खोज के लिए REGEXP_INSTR(name, 'john') या LOWER() उपयोग करें।