-
Could someone please tell me what the limits are to the naming schemas for an oracle database?
example:
What are the illegal characters for table and column names?
Do they have to be all uppercase?
Does oracle only support certain lengths?
Thanks in advance
Arlene
-
Hi
The limits of naming schemas
1) Oracle is not case sensitive so the tablename,columnname can be uppercase or lowercase but the values you store as rows are case sesitive
2) The Table naming coventions are
a) Table Names cannot start with a number 0-9
b) Table Names have to begun with an alphabet but after
the first alphabet you can a number from 0-9
c) Table Names cannot be more then 30 characters in
length
d) the only special character allowed are $ and #
Regards
Santosh
-
Originally posted by santoshym
1) Oracle is not case sensitive so the tablename,columnname can be uppercase or lowercase but the values you store as rows are case sesitive
Actually, that should read that Oracle is case sensitive, so the tablename, columnname can be uppercase or lowercase (or mixed case) but the values you store as rows are case sensitive. You can have separate tables with the names TAB1, Tab1, tab1, etc. The default behavior of Oracle turns all table and column names to uppercase, so it seems like it is case insensitive.
Heath
-
Hi Heath
You cannot have tables like TAB1,Tab1 etc because an object name has to be unique in a schema.I agree that weather you create a table in uppercase or lowercase oracle will automatically convert it to uppercase but you cannot have tables with the same name in a schema.If you try to create a table with the same name you will end up with an error as name is already used by an existing object
Regards
Santosh
-
The names aren't the same. That was the point that I was trying to make.
Run the following to understand what I am trying to explain:
create table tab1( id number(10) );
create table "Tab1"( id number(10) );
create table "tab1"( id number(10) );
select * from USER_CATALOG where UPPER(SUBSTR(TABLE_NAME,1,3))='TAB'
You won't get an error creating the tables and you will see the three tables in your catalog.
-
Hi Heath,
I agree with you no problem as the table names are not the same.Good Catch
Regards
Santosh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|