betweenGo

Inserting a text value with special characters

by Frank Kim on May.29, 2007, under Oracle

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?

  • Share/Bookmark

Related posts:

  1. SQL Insert in One Table Based on Values in Another Table
  2. Display formatted HTML text
  3. Sequences on Oracle
  4. Retrieving the Source from the Database
  5. Determining Permissions for a User

:

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!