4.11 Deleting GeoRaster Objects, and Performing Actions on GeoRaster Tables and RDTs
GeoRaster automatically maintains the GeoRaster metadata and the relationship between GeoRaster tables and raster data tables (RDTs). Therefore, for most operations you can use the relevant traditional SQL statement.
-
To delete a GeoRaster object, delete the row containing the object using the DELETE statement (for example,
DELETE FROM geor_table WHERE ...;
).After a GeoRaster object is deleted from a GeoRaster table, all related raster data stored in the RDT is deleted automatically. Never insert or delete any rows directly in a raster data table.
-
To drop a GeoRaster table, use the DROP statement (for example,
DROP geor_table;
).After a GeoRaster table is dropped, all raster data associated with GeoRaster objects in the deleted GeoRaster table is deleted automatically.
-
To rename a GeoRaster table, use the RENAME statement (for example,
RENAME geor_table1 TO geor_table2;
). -
To add a GeoRaster column to a table, use the ALTER TABLE statement.
However, if you use the ALTER TABLE statement to add one or more GeoRaster columns, you must call the SDO_GEOR_UTL.createDMLTrigger procedure to create the DML trigger on each added GeoRaster column. For example:
ALTER TABLE geor_table ADD (image SDO_GEORASTER); CALL sdo_geor_utl.createdmltrigger('GEOR_TABLE','IMAGE');)
-
To drop a GeoRaster column in a table, use the ALTER TABLE statement (for example,
ALTER TABLE geor_table DROP COLUMN image;
).Caution: Dropping a GeoRaster column will delete all GeoRaster objects in that column.
-
To drop an RDT, you must first delete all GeoRaster objects that reference the RDT, after which you can use the DROP statement on the RDT.
If you do not delete all GeoRaster objects that reference the RDT before attempting to drop the RDT, an exception is raised.
-
To rename an RDT, use the SDO_GEOR_UTL.renameRDT procedure.
Parent topic: GeoRaster Data Query and Manipulation