andPat
andPat

Reputation: 4513

Escaping correctly QUOTE characters in SQL query

I've a column in my MySql database with values like this

firstname + ',' + surname

the character ' is part of the content.

I've to make a query to db like this:

SELECT * FROM UDERSCHEMA where EXPRESSION like 'firstname +  '','' + surname'

as you can see I tried to escape ' quoting it (with another '), but when I make the query on db result is empty set, I've to retrieve instead a set with one entry, how can I modify my query to correctly make MySql understand special characters as ' ?

Upvotes: 0

Views: 125

Answers (1)

Related Questions