I am having query for fetching values from table like
Select email from cust Where name = " John carter's "
i am getting error due to single quotation in string....
please help me for the above problem
I am having query for fetching values from table like
Select email from cust Where name = " John carter's "
i am getting error due to single quotation in string....
please help me for the above problem
This should work:
Select email from cust Where name = " John carter''s"
if this is something you just need to get right now...
Select email from cust Where name LIKE "%John carter%"
or you can escape the apostrophe:
Select email from cust Where name = " John carter''s"
Why don't you use the escape character?
Like this
Select email from cust Where name = " John carter''s "
The problem you're encountering is caused by the fact that (depending on which database program you're using) the single quote '
is a SQL data-modelling language (DML) delimiter, so the SQL parser may not be able to properly handle it.