Will the table alias affect SQL parsing?

Mr. Liu

Member
Hi, I have encountered the situation as follows:

--The two following select statements works well:
SELECT T.*, ROWID FROM SETT.T_PUB_AREA T;
SELECT T.*, T.ROWID FROM SETT.T_PUB_AREA T;

--But these two following select statements report the same error: "ORA-00923: FROM keyword not found where expected"
SELECT *, ROWID FROM SETT.T_PUB_AREA T;
SELECT *, T.ROWID FROM SETT.T_PUB_AREA T;

The only diffrence between these four statements is the place of the table alias T. Is it a bug or grammar mistake?
 
This is an Oracle SQL limitation. You can only use the * without an alias if it's the only field list item.
 
Last edited:
Back
Top