For ex.
My query :
select *
from
(SELECT distinct b.lname||' '||b.fname as "Manager",b.EMPID as "Mgrid"
from EMPLOYEE1) a,
(select lname,fname,empid from EMPLOYEE1) b
where b.EMPID=a.MGRID)
is fetching
Manager Mgrid
---------------- --------
Farooque Umer 104
Sontireddy Kiran 107
Chopra Bhupendra 103
but I cant write :
select Manager, Mgrid
from
(select distinct b.lname||' '||b.fname as "Manager",b.EMPID as "Mgrid"
from EMPLOYEE1) a,
(select lname,fname,empid
from EMPLOYEE1) b
where b.EMPID=a.MGRID)
Error:
[Error] Script lines: 1-1 ————————–
ORA-00904: “MGRID”: invalid identifier
Because as soon as you start enclosing names in double quotes like “Mgrid” they becone case-sensitive. So don’t. Do this:
or if you really like case-sensitive names you must do this: