Friday, May 17, 2013

Using CREATE, TRUNCATE And DROP Statements In PL/SQL.

BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE TEST_DDL(ID NUMBER)';
END;

BEGIN
INSERT INTO TEST_DDL(ID) VALUES (10);
END;

BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE TEST_DDL';
END;

BEGIN
EXECUTE IMMEDIATE 'DROP TABLE TEST_DDL';
END;

1 comment: