Got an Oracle Table Named as Reserved Word, Which problems may arise?
We just got a system outsourced and at first glance i can see some tables and fields with names as CASE or FROM. It is an Oracle 10g DB and we are going to be consuming those data from Java, Hibernate, C#, C++.
Is there something special we should be aware of?
For what i've seen in other posts this is not recomm开发者_StackOverflowended because it will affect readability of our code, but is there any other, major or more serious problems this could cause?
Thanks!
To escape reserved words in Oracle, you need to enclose them (in this case, the table name) in double quotes. IE:
SELECT *
FROM "CASE"
Otherwise, you'll get an "ORA-00903: Invalid table name" error. IIRC, Oracle treats text inside of double quotes as case sensitive so you can still get the error if the table name was created in lowercase when using the example query.
Other than that, I can only see the usual issue with poorly named entities/attributes.
精彩评论