ORACLE: drop a table if it already exist

Oracle does not have a simple if table exists, drop it command like in MySQL. However, you can use this piece of code in your Oracle pSQL code to achieve the same thing: catching the exception ORA-942 table not exist. — drop tables if exists TEST_TABLE BEGIN EXECUTE IMMEDIATE ‘DROP TABLE TEST_TABLE CASCADE CONSTRAINTS’; EXCEPTION […]

person Jason Huangaccess_time May 5, 2015launch Read More