Skip to content
Advertisement

Escape semi colon in “CREATE OR REPLACE AND COMPILE JAVA” statement

I’m trying to execute the following statement in Navicat,

JavaScript

But since ; is treated as a delimiter in SQL query, the query became “incomplete” and results in an error:

enter image description here

So how can I execute this statement in Navicat?

Advertisement

Answer

Store the command as a string and dynamically execute it with an anonymous PL/SQL block:

JavaScript

Not many Oracle IDEs understand the Java syntax, but I would assume that almost all of them can work with PL/SQL blocks.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement