Prakash,
Two methods:
SQL> alter table test modify (c1 varchar2(100));
Table altered.
SQL> insert into test values ('where part_no=''1234'' and name =
''guest''');
1 row created.
SQL> select * from test;
C1
------------------------------------------------------------------------
------
where part_no='1234' and name = 'guest'
SQL> set define off
SQL> show def
define OFF
SQL> insert into test values ('bla&bla');
1 row created.
SQL> select * from test;
C1
------------------------------------------------------------------------
----------------------------
where part_no='1234' and name = 'guest'
bla&bla
SQL> insert into test values ('the cat sat on the "mat"');
1 row created.
SQL> select * from test;
C1
------------------------------------------------------------------------
----------------------------
where part_no='1234' and name = 'guest'
bla&bla
the cat sat on the "mat"
ALTERNATIVE METHOD (Not guaranteed to work cross-platform):
SQL> select ascii('&'), ascii('"') from sys.dual
SQL> /
ASCII('&') ASCII('"')
---------- ----------
38 34
SQL> insert into test values ('bla' || CHR(38) || 'bla' || CHR(34) ||
'bla');
1 row created.
SQL> select * from test;
C1
------------------------------------------------------------------------
----------------------------
where part_no='1234' and name = 'guest'
bla&bla
the cat sat on the "mat"
bla&bla"bla
SQL> spool off
Cheers,
John Thomas
Contract Oracle Development DBA (currently available for development,
development support, performance tuning and other work.)
In article <[EMAIL PROTECTED]>, guess who
<[EMAIL PROTECTED]> writes
>I want to insert the following characters ,
>
>1.) '
>
>2.) "
>
>3.) &
>
>for example i want to insert the following line as it looks...
>
> where part_no='1234' and name='guest'
>
>how to do ?
>
>can anyone help ...
>
>Regards,
>Prakash.
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
John Thomas
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: John Thomas
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).