sql - How to extract tuples from a table using the projection criteria as month name in oracle? -
i have table 'emp' schema defined as(empno, ename,hiredate) ,i trying project out names of employees joined in moth of january , wrote below query not printing records ,it works fine if don't use clause , else not working .
select ename emp ( to_char(to_date(extract(month hiredate),'mm'),'month')) 'january'
please guide me making mistake .
it unnecessarily complicated.
try run select:
select hiredate,extract(month hiredate) emp
then if january 1 select , there arent mistakes, can use:
select ename emp extract(month hiredate)=1
Comments
Post a Comment