Search notes:

Oracle: DBMS_UTILITY.EXEC_DDL_STATEMENT

dbms_utility.exec_ddl_statement is similar to execute immediate but executes only DDL statements (i. e. DML statements are not executed).
Create a table in a PL/SQL procedure:
…

   dbms_utility.exec_ddl_statement(q'[
      create table tab_xyz (
         id  integer primary key,
         val number(5,2)
      )
   ]');
…
The following statement is not a DDL statement, hence, no value is inserted:
begin
   dbms_utility.exec_ddl_statement('insert into tab_a (id) values (42)');
end;
/
Unlike execute immediate, dbms_utility.exec_ddl_statement allows to execute a DDL statement in a remote database using a database link.
begin
   dbms_utility.exec_ddl_statement@remote_db('create table t1 (id number)');
end;
/

Under the hood

Under the hood, exec_ddl_statement simply executes something like the following snippet. Because dbms_sql.execute is not called, DML (and select) statements are not executed.
c := dbms_sql.open_cursor;
dbms_sql.parse(stmt);
dbms_sql.close_cursor(c);

See also

execute immediate
dbms_utility

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758198826, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/installed/packages/dbms/utility/api/exec_ddl_statement(75): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78