Missing commas in select list
The error message ORA-00923: FROM keyword not found where expected might be caused by a missing comma in the selected columns of a select
statement:
select
obj.object_name,
obj.object_type -- <== Note the missing comma!
obj.last_ddl_time,
obj_status
from
user_objects obj;
Using a keyword as alias
Another reason for this error is to use a keyword (such as share
) for a column-alias:
select
'82.3 percent' as share
from
dual;
Keywords can be quoted ("..."
) if the column really needs to be named after a reserved word:
select
'82.3 percent' as "SHARE"
from
dual;
select
keyword
from
v$reserved_words
where
reserved = 'Y'