Search code examples
amazon-redshiftapostrophe

Redshift - Filtering text with apostrophe


I am trying to see how we can query a text that has an apostrophe.

For example

select * from table where name = 'People's'

I am trying to query to filter out rows that have name = People's


Solution

  • In Redshift, just use 2 consecutive '

    so, in your example use

    select * from table where name = 'People''s'