for example, Name
例如,姓名
ANU
ARUN RAJ
KARTHIK
TESNA TITUS LESTU
What I want Name
我想要的是什么名字
ANU
KARTHIK
2 个解决方案
#1
1
Just use not like
:
只是使用不喜欢:
select name
from t
where name not like '% %'
#2
0
Try this to get name column with first name only
试试这个只能获得名字的名字栏
SELECT Name FROM tableName where LOCATE(" ",TRIM(Name))>1;
#1
1
Just use not like
:
只是使用不喜欢:
select name
from t
where name not like '% %'
#2
0
Try this to get name column with first name only
试试这个只能获得名字的名字栏
SELECT Name FROM tableName where LOCATE(" ",TRIM(Name))>1;