Oracle not able to add Default value in PL/SQL I trying to create table in PL/SQL, the problem is the at DEFAULT ' '.

 CREATE OR REPLACE PROCEDURE CREATE_TABLE AS
  strTABLE_NAME varchar2(32);
BEGIN

  strTABLE_NAME := 'Inventory';
  execute immediate 'create table '|| strTABLE_NAME ||' (STORE VARCHAR2(4) DEFAULT ' ' NOT NULL)';

END CREATE_TABLE ;


Error:

   PLS-00103: Encountered the symbol " NOT NULL)" when expecting one of the following:

  * &amp; = - + ; &lt; / &gt; at in is mod remainder not rem return
  returning &lt;an exponent (**)&gt; &lt;&gt; or != or ~= &gt;= &lt;= &lt;&gt; and or
  like LIKE2_ LIKE4_ LIKEC_ between into using || bulk member
  SUBMULTISET_
  The symbol "*" was substituted for " NOT NULL)" to continue.


But i can add the default if i do it in sql tools. How can i add the default value in pl/sql?

CREATE TABLE Inventory
(
  STORE VARCHAR2(4) DEFAULT ' ' NOT NULL,
)
Single quotes inside single quotes need to be duplicated: default '' '' not null

 CREATE OR REPLACE PROCEDURE CREATE_TABLE AS
  strTABLE_NAME varchar2(32);
BEGIN

  strTABLE_NAME := 'Inventory';
  execute immediate 'create table '|| strTABLE_NAME ||
                    ' (STORE VARCHAR2(4) DEFAULT '' '' NOT NULL)';

END CREATE_TABLE ;


See the manual for details and alternative ways of doing that:

Text Literals | docs.oracle.com