110
Views
2
Comments
Solved
how to fetch a record having quotes using sql
Question

Hi All,

           How to fetch a record from a column having a value like Jack's david.when i try to fetch this value within single quotes like 'jack's david' it throws unclosed quotation mark.How to use escape sequence for singles quotes



Thanks,

R.karthik

2017-12-13 08-27-28
Joey Moree
Solution

You can escape single quotes by adding a single quote. (I know it sounds weird).

SELECT * FROM TABLE WHERE VALUE LIKE 'Jack''s David'

Will result in Jack's David

UserImage.jpg
karthimani R

Joey Moree wrote:

You can escape single quotes by adding a single quote. (I know it sounds weird).

SELECT * FROM TABLE WHERE VALUE LIKE 'Jack''s David'

Will result in Jack's David

Hi Joey,

           Thanks for the Solution


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.