Deleting an OBJECT Type from an Oracle Table

This example deletes the OBJECTs and tables created in Creating an OBJECT Type in an Oracle Database.
try { // Create a statement Statement stmt = connection.createStatement(); // Drop table object1_table and types object1 and object2 stmt.execute("DROP TABLE object1_table"); stmt.execute("DROP TYPE object1 FORCE"); stmt.execute("DROP TYPE object2 FORCE"); } catch (SQLException e) { // A drop statement will throw an exception if the table or type does not exist }

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.