要使用动态数组实现LIKE查询,语法如下-
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)
-> )
-> ;