Search code examples
sqloracle11goracle-sqldeveloper

How to insert a value that contains percentage symbols?


I have a query like as below

INSERT INTO table_name (column1, ...)
VALUES ('a.jsp?action=delete&TASK_ID=%TASK_ID%', ...);

On executing it in SQLdeveloper, it's asking to enter the value of TASK_ID. How do I skip it and just enter it as a part of the value?


Solution

  • It is not the percentage sign, but ampersand. It says that you want to use a substitution variable (but you don't).

    What to do? Prior to executing that insert, type set define off and execute it. Then run insert.