Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2004
Added on Apr 22 2004
7 comments
1,943 views