I would like to get all the characters in a field before a space
For example, if field1 is "chara ters"
field1
"chara ters"
I want it to return "chara"
"chara"
What would this select statement look like?
SELECT LEFT(field1,LOCATE(' ',field1) - 1)
Note that if the string in question contains no spaces, this will return an empty string.
1.4m articles
1.4m replys
5 comments
57.0k users