Reputation: 2921
I am not able to drop a table from my Database.
For the query select owner from ALL_TABLES where TABLE_NAME ='db_schema_version';
I see the result as OWNER_FC
For the query show user;
I see the result USER is "OWNER_FC"
But when I try to drop the table using the query drop table db_schema_version cascade constraints;
then I get the below error:
drop table db_schema_version cascade constraints
Error report -
ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
*Cause:
*Action:
Since I am the owner I dont understand why I am not able to drop the table?
I think this table is created by Flyway
but I am not sure if that is relevant information here
Upvotes: 1
Views: 713
Reputation: 168041
For the query
select owner from ALL_TABLES where TABLE_NAME ='db_schema_version';
I see the result as
OWNER_FC
The table name is in lower-case in the data dictionary. This means you need to provide the table name in lower-case in your query, for which you need to surround it in double-quotes, and you may need to specify the schema:
DROP TABLE "db_schema_version" CASCADE CONSTRAINTS;
or
DROP TABLE OWNER_FC."db_schema_version" CASCADE CONSTRAINTS;
Upvotes: 2