title: How to use the 'as' keyword to alias a table in Oracle?
body: <p>I'm trying to execute this query in Oracle SQL Developer:</p>
  
  <pre><code>SELECT G.Guest_ID, G.First_Name, G.Last_Name
  FROM Guest AS G
    JOIN Stay AS S ON G.Guest_ID = S.Guest_ID
  WHERE G.City = 'Miami' AND S.Room = '222';
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <pre><code>ORA-00933: SQL command not properly ended
  00933. 00000 - "SQL command not properly ended"
  *Cause:
  *Action:
  Error at Line: 2 Column: 12
  </code></pre>
  
  <p>I don't see any problem in line 2 and the error is not very descriptive. It appears to be something to do with the <code>as</code> keyword. If I remove it, it works fine. However, I want my queries to be very verbose. Therefore, I must figure out a way to fix whatever the problem is without removing the <code>as</code> keyword.</p>
  
  <p>This is the structure of the tables involved:</p>
  
  <pre><code>CREATE TABLE GUEST
  (
    GUEST_ID       NUMBER               NOT NULL,
    LAST_NAME      VARCHAR2(50 BYTE),
    FIRST_NAME     VARCHAR2(50 BYTE),
    CITY           VARCHAR2(50 BYTE),
    LOYALTY_NUMBER VARCHAR2(10 BYTE)    
  );
  
  CREATE TABLE STAY
  (
    STAY_ID        NUMBER                         NOT NULL,
    GUEST_ID       NUMBER                         NOT NULL,
    HOTEL_ID       NUMBER                         NOT NULL,
    START_DATE     DATE,
    NUMBER_DAYS    NUMBER, 
    ROOM           VARCHAR2(10 BYTE)
  );
  </code></pre>
  
  <p>Thanks for any help in advance.</p>