English

FAQ: Can an St_Geometry attribute be dropped using SQL in Oracle?

Question

Can an St_Geometry attribute be dropped using SQL in Oracle?

Answer

An St_Geometry attribute can be dropped from a table in Oracle if the spatial index has been dropped first. If the spatial index has not been removed, the following Oracle error displays:

"ORA-29884: domain index is defined on the column to be dropped".

Cause: An ALTER TABLE DROP COLUMN was issued on a column on which a domain index exists.

Action: Drop the domain index before dropping the column.

Code:
SQL> ALTER TABLE rivers DROP (shape);
alter table rivers drop (shape)
*
ERROR at line 1:
ORA-29884: domain index is defined on the column to be dropped


For additional information, see the link to the Oracle Documentation in Related Information.

Related Information