Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to insert the '&' character into table which is between in a string

MakeEasyLifeJan 6 2009 — edited Jan 6 2009
SQL> create table s(ss varchar(10));

Table created.

SQL> insert into s values('2 & 3');
Enter value for 3:
old 1: insert into s values('2 & 3')
new 1: insert into s values('2 ')

1 row created.

SQL> select * from s;

SS
----------
2

SQL> drop table s;

Table dropped.

SQL> create table s(ss varchar2(10));

Table created.

SQL> insert into s values('2 & 3');
Enter value for 3:
old 1: insert into s values('2 & 3')
new 1: insert into s values('2 ')

1 row created.

SQL> select * from s;

SS
----------
2

SQL> drop table s;

Table dropped.

SQL> create table s(ss nvarchar2(10));

Table created.

SQL> insert into s values('2 & 3');
Enter value for 3:
old 1: insert into s values('2 & 3')
new 1: insert into s values('2 ')

1 row created.

SQL> select * from s;

SS
----------
2

SQL> drop table s;

Table dropped.

SQL> create table s(ss char(10));

Table created.

SQL> insert into s values('2 & 3');
Enter value for 3:
old 1: insert into s values('2 & 3')
new 1: insert into s values('2 ')

1 row created.

SQL> select * from s;

SS
----------
2

SQL> drop table s;

Table dropped.

SQL> create table s(ss nchar(10));

Table created.

SQL> insert into s values('2 & 3');
Enter value for 3:
old 1: insert into s values('2 & 3')
new 1: insert into s values('2 ')

1 row created.

SQL> select * from s;

SS
----------
2

Edited by: user10438587 on 06-Jan-2009 07:57
This post has been answered by isotope on Jan 6 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2009
Added on Jan 6 2009
6 comments
1,251 views