"Ciprian A." wrote:

> Hi,
> 
> I need to select from a table all the records that do not contain a certain
> string. Any idea how I can do this?
> 
> For example if I want to select all the fields that contain the string
> "my_string" I type:
> $ select * from table_name where column_name like "%my_string%".

try this:

select * from table_name where column_name NOT like "%my_string%"

hth, Jeroen

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to