Inserting a text value with special characters

To insert a text value with an ampersand, e.g. AT&T, one can do something like this.

insert into foo values(‘AT’||Chr(38)||’T’)

To learn more see How does one disable interactive prompting in SQL*Plus?

To insert a text value with a single quote, e.g. Don’t do it, one can do something like this.

insert into foo values(‘Don”t do it’)

To learn more see How does one escape special characters when building SQL queries?

Leave a Reply

Your email address will not be published. Required fields are marked *