0

I need to save string with single quote in column with nvarchar2 data type. I find here

https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm

that I can save it using quote operator. I try to do it in my SQL query

insert into table (question_pattern_id, text, event_selection_id, context_theme_id, placeholder_body) 
values ('65', nq'[]', '', '', nq'[]')

but it inserts ?? instead of

Before data was added by query

insert into table (question_pattern_id, text, event_selection_id, context_theme_id, placeholder_body) 
values ('65', n'', '', '', n'')

and everything was saved correctly

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    If `n''` works, then why do you want to use something else? –  Jun 02 '20 at 14:00
  • n'' works if i don't set value with quotes, but if i use n''"&' then will be error Caused by: java.sql.SQLSyntaxErrorException: ORA-00917: missing comma – amonshi Jun 02 '20 at 14:29
  • 1
    https://stackoverflow.com/questions/2875257/ –  Jun 02 '20 at 15:39

0 Answers0