title: Oracle why does creating trigger fail when there is a field called timestamp?
body: <p>I've just wasted the past two hours of my life trying to create a table with an auto incrementing primary key bases on <a href="http://www.lifeaftercoffee.com/2006/02/17/how-to-create-auto-increment-columns-in-oracle/" rel="nofollow noreferrer">this tutorial</a>, The tutorial is great the issue I've been encountering is that the Create Target fails if I have a column which is a timestamp and a table that is called timestamp in the same table...</p>
  
  <p>Why doesn't oracle flag this as being an issue when I create the table?</p>
  
  <p>Here is the Sequence of commands I enter:</p>
  
  <ol>
  <li><p>Creating the Table:</p>
  
  <pre><code>CREATE TABLE myTable
     (id NUMBER PRIMARY KEY,
      field1 TIMESTAMP(6),
      timeStamp NUMBER,
  );
  </code></pre></li>
  <li><p>Creating the Sequence:</p>
  
  <pre><code>CREATE SEQUENCE test_sequence
  START WITH 1
  INCREMENT BY 1;
  </code></pre></li>
  <li><p>Creating the trigger:</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER test_trigger  
  BEFORE INSERT  
  ON myTable  
  REFERENCING NEW AS NEW  
  FOR EACH ROW  
  BEGIN  
  SELECT test_sequence.nextval INTO :NEW.ID FROM dual;  
  END;  
  /
  </code></pre></li>
  </ol>
  
  <p>Here is the error message I get:</p>
  
  <pre><code>ORA-06552: PL/SQL: Compilation unit analysis terminated
  ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
  </code></pre>
  
  <p>Any combination that does not have the two lines with a the word "timestamp" in them works fine. I would have thought the syntax would be enough to differentiate between the keyword and a column name. </p>
  
  <p>As I've said I don't understand why the table is created fine but oracle falls over when I try to create the trigger...</p>
  
  <p><strong>CLARIFICATION</strong></p>
  
  <p>I know that the issue is that there is a column called timestamp which may or may not be a keyword. MY issue is why it barfed when I tried to create a trigger and not when I created the table, I would have at least expected a warning.</p>
  
  <p>That said having used Oracle for a few hours, it seems a lot less verbose in it's error reporting, Maybe just because I'm using the express version though.</p>
  
  <p>If this is a bug in Oracle how would one who doesn't have a support contract go about reporting it? I'm just playing around with the express version because I have to migrate some code from MySQL to Oracle.</p>