Reputation: 1
I recently tried my hand at SQL. There was a query requirement where I had to list "9. Display the empno, ename, job, hiredate, exp of all the Mgrs". I typed
select EMPNO,ENAME,JOB,HIREDATE,(sysdate-hiredate)as Experience
from emp
where JOB ='Manager';
The result, no records fetched. Only the metadata gets displayed.
Previously the other queries are working fine.
Please help!
Upvotes: 0
Views: 955
Reputation: 231691
That doesn't appear to be a SQL Developer issue. The problem appears to be that your query returns 0 rows.
String comparisons in Oracle (barring cases where you've adjusted your session's NLS settings) are case sensitive. There are, realistically, no rows where the job
is "Manager". There are, realistically, rows where the job
is "MANAGER". You'd need to search for the string with the proper case
SELECT *
FROM emp
WHERE job = 'MANAGER'
Upvotes: 1