As a word of advice, before posting to any list, please RTFM (Read The Fine
Manual).

You have to escape all "special characters", like apostrophes and single
quotes, with the backslash.

INSERT INTO thetable (name) VALUES ('O\'Connell');

http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html

J.R.

-----Original Message-----
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 15, 2006 1:37 AM
To: mysql@lists.mysql.com
Subject: Inserting ' into database

Hi all,

Assume that I want to insert "Juanita O'Connell" into my database. How do I
do that? The problem is the ' in her last name. If I just put it in it will
be

INSERT INTO thetable (name) VALUES ('O'Connell');

And that does not work :) How can I solve this?

Best regards,
Peter Lauri


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to