You need to escape the apostrophe first
so
select count(*) from table where field like '%\'%'
On Tue, Mar 25, 2008 at 2:37 PM, Saravanan <suzuki_babu@yahoo.com> wrote:
> hi lists,
>
> I want to count the number of rows containing "'" aphostrophe in a
> particular field. I tried with
>
> select count(*) from table where field like "%'%"
>
> i get only 0 counts. but I am sure that exists in many rows.
>
> how to query them
>
> Saravanan
>
>
>
> __________________________________________________ __________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=pchapman@nc.rr.com
>
--
build our city at
http://free-dc.myminicity.com !