Snippet Name: Finding a substring in a string Description: Easy way to find a substring within a string. Comment: (none) Language: MYSQL Highlight Mode: MYSQL Last Modified: March 01st, 2009
Description: Easy way to find a substring within a string.
SELECT name, INSTR(name, ' '), SUBSTRING(name,1,INSTR(name,' ')) FROM cia WHERE name LIKE '% %'