betweenGo

Inserting a text value with special characters

by 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

Related posts:

  1. SQL Insert in One Table Based on Values in Another Table
  2. Sequences on Oracle
  3. Retrieving the Source from the Database
  4. Determining Permissions for a User
  5. Updating/Reading Dates

:

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!