How to insert value 'a & b' in the varchar2 column.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: How to insert value 'a & b' in the varchar2 column.

Hybrid View

  1. #1
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Hi all,

    How to insert value 'a & b' in a varchar2 column? It takes '&' as promting for bind variable.

    Thanks
    Sanjay

  2. #2
    Join Date
    Mar 2001
    Posts
    12
    Hi Sanjay,

    Use the following to insert a&b in a varchar2 column. I have used a test table d1 with a column a1.

    SQL> set escape #
    SQL> insert into d1 values ('a#&b');

    1 row created.

    SQL> select * from d1;

    A1
    ----------
    a&b

    Thanks and regards

    Debaditya

  3. #3
    Join Date
    Mar 2001
    Posts
    54

    INSERT INTO VALUES ('a\&b')

    It will do

  4. #4
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    It works.. Thanks much.

    Sanjay

  5. #5
    Join Date
    Oct 2000
    Posts
    123
    Besides "set define off", are there other way to do that?
    Eg, insert into a values('a&b') in PL/SQL which is not SQL/PLUS env?

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width