ORA-01704: string literal too long

update mkt_page_links
set longdescription = ' {some html text > 4000 char} '
where menuidno = 310;

(longdescription  type is clob)

execute this cmd against oracle database via OracleClient, you will get the following error.

 

ORA-01704: string literal too long

Cause: The string literal is longer than 4000 characters.

Action: Use a string literal of at most 4000 characters. Longer values may only be entered using bind variables.

 

solution:

DECLARE
  str varchar2(32767);
BEGIN
  str := 'Very-very-...-very-very-very-very-very-very long string value';
  update t1 set col1 = str;
END;

你可能感兴趣的:(String)