Use of quotes in a table name?
419780Apr 22 2004 — edited Apr 26 2004
Hello,
It seems Oracle treats a table name with and without quotes differently.
SQL> create table abc (x integer);
SQL> create table "abc" (y integer);
These two commands result in two different tables as can be seen from the following commands:
SQL> desc abc;
SQL> desc "abc";
However, I cannot get the list of tables.
SQL> select * from tab where tname like '%abc%';
returns just one row.
SQL> select * from all_objects where object_name like '%abc%' also does not show me abc and "abc" as two separate tables.
Q1. Is there a way to obtain the proper list?
Q2. What is the proper qualifier for specifing a table name? For example, SQL Server supports "[" and "]" around the table name. However, I could not find the equivalent grammar for PL/SQL.
The following command works (by trial and error):
SQL> select * from (abc);
However, the following doesn't:
SQL> drop table (abc);
which means that "(" and ")" are not the qualifiers.
Thank you in advance for your help.
Pradeep