mysql select语句不适用于某些员工姓名 [英] mysql select statement not working for some of employee names
问题描述
大家好...
此查询已有一段时间无法使用
这里empname和rollno的类型为varchar
hi all...
this query not working for some time
here empname and rollno is of type varchar
select * from emp where empname like '%Vaishnavi V%' or rollno like '%Vaishnavi V%' order by rollno
Vaishnavi V是数据库中存在的empname
它会返回-> MySQL返回了一个空结果集(即零行). (查询用时0.0005秒)
当我给像
Vaishnavi V is the empname existed in database
it will return --> MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0005 sec )
when am giving like
select * from emp where empname like '%tulasi ram V%' or rollno like '%tulasi ram V%' order by rollno
该语句返回1条记录..
我已经尝试过多种方式来获得"Vaishnavi V"这个不会显示的名称,它总是返回空记录我如何才能获得Vaishnavi V这个人的记录
任何人都可以帮我吗
在此先感谢
the statement returns 1 record..
i have tried in many ways to get ''Vaishnavi V'' this name it wont showing always returns empty records how can i get records of Vaishnavi V this person
can any one help me please
thanks in advance
推荐答案
1.这些名称之间包含空格,请确保在输入时正在搜索数据库中提到的相同空格.当您使用时,为什么要全文?只需搜索Vaishnavi,您应该会得到结果
2.将%放在Vaishnavi V之后,搜索可以以任何结尾,但需要以Vaishnavi V开头
1. These name contain space in between, please make sure while entering you are searching same space mentioned in the database. When you are using like why you want the complete text ? just search Vaishnavi you should get the result
2. Put % after Vaishnavi V, Search can end with anything but need to start with Vaishnavi V
这篇关于mysql select语句不适用于某些员工姓名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!