Re: apostrophes in an SELECT SQL statement

From: <Lance.Humpert_at_mail.tju.edu>
Date: 1996/07/19
Message-ID: <177C9D0D2.ASVLH_at_TJUVM.TJU.EDU>#1/1


Jason Byors asks:  

> How could the following SELECT SQL statement be written so that it
> will work:
>
> SELECT * FROM movies WHERE title = 'Muriel's Wedding'
 

To specify an apostrophe inside of a string literal, double up the apostrophe like this:  

  select * from local_bars where name = 'O''Connor''s Tavern';  

  • Lance (it's Friday, and I've got happy hour on my mind)
Received on Fri Jul 19 1996 - 00:00:00 CEST

Original text of this message