5
I’m trying to select several columns from a single table, and to facilitate the process of viewing the data and making it easier to separate the columns, I decided to use aliases.
But the problem is that when running the query, it returns me the following error :
ORA-00923: FROM keyword not located where expected
My code is like this :
SELECT MAX(salary) as 'Maximo Salário' ,
MIN(salary) as 'Minimo Salário',
SUM(salary) as 'Soma de Todos Salários',
AVG(salary) as 'Média Salarial' FROM employees
According to the Oracle documentation itself, a column of a table with aliases is selected as follows :
column_name AS alias_name
So what am I doing wrong here ? There should be some WHERE
in this SELECT
? But it is not mandatory to have it, only in cases where it is necessary to use it in fact.
How can I use aliases correctly in this SELECT
?
Has the answer solved your problem? If not, is there anything I can do to improve it?
– Jéf Bueno
Solved yes, I just forgot to put as a right answer. Anyway, I put it now and again thank you for the help :)
– Monteiro