Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle ORA-00942: table or view does not exist when it exists [duplicate]

I'm trying to get used to Oracle, installed express one and created by 3rd part program some tables. And when I log in into sqlplus I can not simply use SELECT * FROM table....

SQL> SELECT * FROM tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
ZIP                            TABLE
Country                        TABLE
City                           TABLE

But when I try to select all it runs:

SQL> SELECT * FROM Country;
SELECT * FROM Country
              *
ERROR at line 1:
ORA-00942: table or view does not exist

And I have no idea why...

like image 604
Thou Avatar asked Sep 01 '25 21:09

Thou


1 Answers

It seems that case matters. What is the result of

select * from "Country";

It appears that someone created table using double quotes and mixed case (which is - in Oracle - a bad idea because you'll always have to reference it using double quotes and never fail in correctly spelling it.

like image 193
Littlefoot Avatar answered Sep 03 '25 14:09

Littlefoot