title: Enclosing column names within double quoatation marks with CREATE command in Oracle doesn't work properly. Why?
body: <p>Lets consider a simple table say <code>products</code> in Oracle (I tried on Oracle 9i). I'm creating this table with the following CREATE statement.</p>
  
  <pre><code>CREATE TABLE products
  
  ("prod_id" varchar2(7) primary key, "product_name" varchar2(30) NOT NULL);
  </code></pre>
  
  <p>It is to be noted specially that I'm enclosing the column names within double quotation marks <code>""</code> as not usually we do. It would obviously work and the <code>products</code> table would be created with those two columns with the specified CONSTRAINTS.</p>
  
  <hr>
  
  <p>Now, lets insert some rows into this table using the following INSERT INTO command.</p>
  
  <pre><code>INSERT INTO products VALUES('P0001', 'Nokia-N97');
  INSERT INTO products VALUES('P0002', 'Nokia-1208');
  INSERT INTO products VALUES('P0003', 'Nokia-1115');
  </code></pre>
  
  <p>Would insert three rows into the <code>products</code> table.</p>
  
  <hr>
  
  <p>To make sure that these rows have indeed inserted or not, we can issue a SELECT statement as follows.</p>
  
  <pre><code>SELECT * FROM products;
  </code></pre>
  
  <p>Would work just fine and display three rows we inserted.</p>
  
  <hr>
  
  <p>Now, the actual question here. When we issue the following SELECT statement,</p>
  
  <pre><code>SELECT prod_id, product_name FROM products;
  </code></pre>
  
  <p>would not work even though we didn't make any mistake in this SQL. Oracle would report instead that such columns don't exist. Why does this happen? There must be very specific reason behind it, I think.</p>
  
  <p>I'm sure that enclosing column names unnecessarily within double quotation marks as I have just done may not be the best practice but just a question occurred to me.</p>