E.g: Code=\'\'
. If I use Code =\'\'\'\'
, in the result I\'m getting only one quote.
More information in your qustion would be helpful. Which OS or where exactly you execute it. Here is a working example from a Db2 command line:
db2 create table str(text varchar(20))
DB20000I The SQL command completed successfully.
db2 "insert into str values '''''' "
DB20000I The SQL command completed successfully.
db2 select * from str
TEXT
--------------------
''
1 record(s) selected.
Note the double quotes round the SQL to avoid shell interactions/reactions.
Keep the current start and end quotes. Then double each quote supposed to be a part of the string value.
Code = ''''''
Or you can perhaps use a Unicode string literal:
Code = U&'\0027\0027'