ORA-00972 identifier is too long alias column name

mcha picture mcha · Jun 21, 2010 · Viewed 238.5k times · Source

i have a query like :

SELECT column as averyveryveryverylongalias (more than 30 characters)
   FROM Table_name

it returns the error ORA-00972 identifier is too long , is there any tip to make it work without making the alias shorter?

Thanks

Answer

Tony Andrews picture Tony Andrews · Jun 21, 2010

No, prior to Oracle version 12.2, identifiers are not allowed to exceed 30 characters in length. See the Oracle SQL Language Reference.

However, from version 12.2 they can be up to 128 bytes long. (Note: bytes, not characters).