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 ;
PLS-00103: Encountered the symbol " NOT NULL)" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem return returning <an exponent (**)> <> or != or ~= >= <= <> 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, )