I am trying to collect all the names with an extension at the end of a string in MYSQL.
Table1
ID | Name
0 Bob 1
1 Bob 2
2 Joe 1
3 Joe 2
4 Bob
5 Joe
The query I'm running is similar to this one:
SELECT ID, name
FROM Fname
WHERE name = CONCAT(name,' ','1');`
Where I want to collect all the Names that end it a space and 1.
使用方式like
:
where name like '% 1'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.