0

Using DynamoDB, I want to insert a record that contains a string with a single quote ('). Not sure how to escape this so it passes validation.

INSERT INTO "MyTable" VALUE {
  'MyAttr': 'some message containing a \' quote'
}

NOTE: escaping as I have above with a \ does not work.

maxmoore14
  • 701
  • 7
  • 26

1 Answers1

2

You do so using an additional single quote:

INSERT INTO "MyTable" VALUE {
  'MyAttr': 'some message containing a '' quote' 
}
Leeroy Hannigan
  • 11,409
  • 3
  • 14
  • 31