Reputation: 4189
I have created a table has name is FILE
(via SQL Navigator), now I would like to drop this table(sql: drop table FILE
), but I can not, it throw an exception: invalid table name
.
I have to change table's name, and then i can drop it:
alter table FILE rename to FILE_
Please explain me why I can create but I can not drop it, thank for your suggestion :)
Upvotes: 2
Views: 494
Reputation: 753825
DROP TABLE "FILE";
Enclosing the name in double quotes makes it case-sensitive but also marks it as a delimited identifier rather than a keyword.
Upvotes: 1
Reputation: 7986
You can create and drop table with special name. Just use "".
create table "file" (..)
drop table "file"
Upvotes: 4