MySQL Forums
Forum List  »  Newbie

Re: mysql prompt suddenly changed
Posted by: Peter Brawley
Date: January 14, 2020 09:23AM

> Is an apostrophe is not permitted inside a text string?

Sure it is, but you need to tell MySQL that a particular apostrophe is data and not a string delimiter.

You do that by "escaping" it, ie preceding it with the "escape" char, the backslash \` ...
select "Bob\'s lunch";
+-------------+
| Bob's lunch |
+-------------+
| Bob's lunch |
+-------------+

Options: ReplyQuote


Subject
Written By
Posted
January 14, 2020 05:07AM
Re: mysql prompt suddenly changed
January 14, 2020 09:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.