Ed Heal Ed Heal - 4 months ago 23
SQL Question

Dynamic SQL - Check syntax and semantics

With Oracle dynamic SQL one is able to execute a string containing a SQL statement. e.g.

l_stmt := 'select count(*) from tab1';
execute immediate l_stmt;


Is it possible to not execute
l_stmt
but check that the syntax and semantics is correct programmitically?

Answer

I think that the only "solution" is to use DBMS_SQL.PARSE().

It is not perfect but it is the best that you can get

Comments