Category: >> mySQL >> Finding a substring in a string Bookmark and Share

<< lastnext >>

Snippet Name: Finding a substring in a string

Description: Easy way to find a substring within a string.

Comment: (none)

Author: CoderZone
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: March 01st, 2009

SELECT name, INSTR(name, ' '), SUBSTRING(name,1,INSTR(name,' ')) 
FROM cia WHERE name LIKE '% %'
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© | users online: 5