Alex Rivera | Logout

How do I deal with quotes ' in SQL

Asked 2008-08-27T08:01:04.417
11

I have a database with names in it such as John Doe etc. Unfortunately some of these names contain quotes like Keiran O'Keefe. Now when I try and search for such names as follows:

SELECT * FROM PEOPLE WHERE SURNAME='O'Keefe' 

I (understandably) get an error.

How do I prevent this error from occurring. I am using Oracle and PLSQL.

Edit
Report

1 Answer

-3

Found in under 30s on Google...

Oracle SQL FAQ

answered 2008-08-27T08:03:07.967

Your Answer