ORA-00903: invalid table name
FranklinFaces.com
FranklinFaces.com - Oracle & SQL Server Database Forums for all IT Professionals
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



ORA-00903: invalid table name Expand / Collapse
Message
Posted 2/27/2009 1:59:46 PM Post #93
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
00903, 00000, "invalid table name"
// *Cause:
// *Action:



This is very simple ora error to tackle. Infact, the cause maybe that you tried to execute an SQL statement that included an invalid table name or the table name does not exist. Revisit your sql statement.

Sometimes when you login as sys and create a table, you don't realize it but you ended up creating a table in the sys schema. Majority of the time, you want to make sure the schema name is entered:

Example:
select * from inv.customer;

In many other cases you tend to copy and paste and you didn't realize that the word from got copied too and type it in again:

SQL> select * from FROM;
select * from FROM
*
ERROR at line 1:
ORA-00903: invalid table name



Also there are ORACLE reserved words that you cannot use as a table name. Check to see if you are trying to create or select from something that doesn't exist because it's a reserved word. Here are some guidelines:

•The valid table name must be less than or equal to 30 characters.

•The table or cluster name must begin with a letter and may contain only alphanumeric characters and the special characters $, _, and #.

•The table name cannot be a reserved word.

Hope this helps.
Posted 2/27/2009 2:17:27 PM Post #94
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
I've seen in many cases that the DELETE command is not used properly which may lead to this error 00903, 00000, "invalid table name"
message.

Here is an example of what I mean:


SQL> delete * from CUSTOMER
where CUSTOMER_ID in (
"1B04",
"1B08",
"1C01");

delete * from CUSTOMER
*
ERROR at line 1:
ORA-00903: invalid table name


In this statement, one would think that there is nothing wrong with it. Here's the key: It's the "*"
The asterisk is not needed when you are using the DELETE statement because it deletes the entire row.

Correct way:

SQL> DELETE FROM CUSTOMER WHERE CUSTOMER_ID IN("1B04","1B08","1C01");


Thanks,
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: silencer

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:13am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.068. 8 queries. Compression Disabled.