सिंटैक्स
select * from yourTableName where yourColumnName2 like "%yourValue%" order by yourColumnName1 asc limit yourLimitValue;
उदाहरण: कॉमा-सेपरेटेड नामों में खोज
mysql> create table demo74 (user_id int not null auto_increment primary key, user_names varchar(250));
mysql> insert into demo74(user_names) values('John Smith1,John Smith2,John Smith3'), ('John Smith1'), ('David Smith1'), ('John Smith1,John Smith2,John Smith3,John Smith4');
"John Smith1" खोजना
mysql> select * from demo74 where user_names like "%John Smith1%" order by user_id asc limit 100;
+---------+-------------------------------------------------+ | user_id | user_names | +---------+-------------------------------------------------+ | 1 | John Smith1,John Smith2,John Smith3 | | 2 | John Smith1 | | 4 | John Smith1,John Smith2,John Smith3,John Smith4 | +---------+-------------------------------------------------+
चेतावनी: कॉमा-सेपरेटेड स्ट्रिंग में LIKE से आंशिक मिलान (जैसे "John Smith10") भी आ सकते हैं; बेहतर है FIND_IN_SET() या नॉर्मलाइज़्ड टेबल।