There is a varchar2 column ,How can I insert data which contains ' in it ,eg-Ora'cle ??The value to be inserted may vary with every insertion and we can't specifically tell as to whats the position of single quotes ..

Showing Answers 1 - 4 of 4 Answers

Musharraf Dabre

  • Sep 18th, 2006
 

You need to use UNISTR() function.

for eg: oracl'e

enter the sql:

insert into tablename values('oracl'||unistr('300')||'e');

ouput:

1 row created.

then say:

select * from tablename;

  Was this answer useful?  Yes

Anu

  • Sep 18th, 2006
 

Hi,

   You can do it in this way

    insert into test values('ora''cle');

   use two single quotes side by side..(its not a double quote)

   hope this will work

Regards,

Anu

  Was this answer useful?  Yes

senthilkumar

  • Oct 12th, 2006
 

-MS SSQL Inserting integer values in to varchar columINSERT INTO (col1) VALUES(CONVERT(VARCHAR,10))

  Was this answer useful?  Yes

senkumaar

  • Oct 12th, 2006
 

In MS-SQL server we can use likeINSERT INTO () VALUES CONVERT(VARCHAR,))ExampleINSERT INTO SEN_TEST(NAMEE) VALUES(CONVERT(VARCHAR,10))

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions