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.

Table name - Lower, upper case

user8720164Dec 9 2009 — edited Dec 9 2009
Hi,

Thank you for reading my post.
--------------------------------------------------------------------------------------------------------------------------------
1) I created a table:

CREATE TABLE radios(name varchar2(20), frequency varchar2(20));

Notice that the table name is lower case ("radios").
--------------------------------------------------------------------------------------------------------------------------------
2) I added a constraint on the "name" column:

ALTER TABLE radios ADD CONSTRAINT name_pk PRIMARY KEY(name);
--------------------------------------------------------------------------------------------------------------------------------
3) Now I want to list the existing constraints for the table "radios".

3.a) If I use the lower case table name, the result is empty:

SQL> SELECT constraint_name, constraint_type
FROM user_constraints
WHERE table_name = 'radios';

no rows selected

3.b) Now, if I use the upper case table name, I get what I am looking for:

SQL> SELECT constraint_name, constraint_type
FROM user_constraints
WHERE table_name = 'RADIOS';

CONSTRAINT_NAME C
NAME_PK P
--------------------------------------------------------------------------------------------------------------------------------
Can you explain me that phenomenon?
I mean: I created a table name lower case so why does it work
only with the upper case formulation?

Do we have to create upper case table names consistently?
How do you create table names: do you create them upper case?

Thank you for your help.
Sincerely,
--
Lmhelp
This post has been answered by 289595 on Dec 9 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2010
Added on Dec 9 2009
4 comments
12,644 views