Take the 2-minute tour ×

This question already has an answer here:

I've got a question. Why does my Oracle Express Edition requires double-quoted table names:

Not working select:

select * from table

Working select:

select * from "table" 

Thanks for answers and help with editing my post. I was confused how to name this case.

share|improve this question
I understand English is not your mother tongue but you could put some effort in making the question readable. What's your exact problem? Does select * from table work or not? –  Álvaro G. Vicario Apr 20 '12 at 8:11
Yes select * from table is not working; But select * from "table" is... –  Endiss Apr 20 '12 at 8:19
This answer should help you: stackoverflow.com/questions/563090/… –  Ollie Apr 20 '12 at 8:29
I've tried to make your question clearer. But next time don't forget to post here the error message. –  Álvaro G. Vicario Apr 20 '12 at 8:35
@Ollie - Nice catch, the explanation is better than mine. –  Álvaro G. Vicario Apr 20 '12 at 8:36
add comment

marked as duplicate by Álvaro G. Vicario, Ben, John Doyle, Andrei Mikhalevich, Lorenz Meyer Mar 3 at 11:51


2 Answers

up vote 4 down vote accepted

It requires double quote names only in case the name you are using is a keyword (and your example - table is in this situation) or if you want to include special characters or non-alphanumeric characters (e.g. "Multi word table name").

The names enclosed in " are case sensitive.

share|improve this answer
add comment

Use doublequotes only: select * from "table";

it works without quotes only of name was created is in uppercase. By default all unquoted names are stored in uppercase.

For example:

CREATE TABLE "T1" (x number);

-- That works:
select * from "T1";

-- that works too:
select * from t1;

-- that works too:
select * from T1;

TABLE - is a keyword. So you can it use without quotes even if you used name in uppercase in create statement:

CREATE TABLE "TABLE" (x number);

select * from table;

ORA-00906: missing left parenthesis
share|improve this answer
I would recommend avoiding the use of keywords for databases, tables and column names and then the problem would not happen :) –  Ren Apr 2 '13 at 9:55
Correct - good recommendation, but it does not contradict to the naming rules if use double quotes. –  Rusty Dec 16 '13 at 12:26
add comment
