 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
uni Guest
|
Posted: Wed Feb 25, 2004 9:06 am Post subject: mysql partial string search |
|
|
hello,
I was wondering if it is possible to search a mysql database by partial
strings, like say i have a name column with scotland, and i give this
string,
select * from table where name='co';
are there any signs like in linux you can say *co* to the anywhere in the
string...
Thanks
Erik
|
|
| Back to top |
|
 |
Christophe Vanfleteren Guest
|
Posted: Wed Feb 25, 2004 9:14 am Post subject: Re: mysql partial string search |
|
|
uni wrote:
| Quote: | hello,
I was wondering if it is possible to search a mysql database by partial
strings, like say i have a name column with scotland, and i give this
string,
select * from table where name='co';
are there any signs like in linux you can say *co* to the anywhere in the
string...
|
Try
select * from table where name like '%co%'
--
Kind regards,
Christophe Vanfleteren
|
|
| Back to top |
|
 |
uni Guest
|
Posted: Wed Feb 25, 2004 9:16 am Post subject: Re: mysql partial string search |
|
|
thanks,
"Christophe Vanfleteren" <c.v4nfl3t3r3n (AT) pandora (DOT) be> wrote
| Quote: | uni wrote:
hello,
I was wondering if it is possible to search a mysql database by partial
strings, like say i have a name column with scotland, and i give this
string,
select * from table where name='co';
are there any signs like in linux you can say *co* to the anywhere in
the
string...
Try
select * from table where name like '%co%'
--
Kind regards,
Christophe Vanfleteren
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|