+ 1
How to retrieve employees whose birth date is between 1992 to 1996
5 odpowiedzi
+ 6
select * from employee where year (birthdate) between 1992 and 1996 ;
//this was method 1 ☺
select * from employee where year (birthdate)>=1992 and year (birthdate)<=1996 ;
// this was method 2
//note : in method 1 also , between will include 1992 and 1996 too
//hope it helps ☺
+ 1
if full birthdate is ustored in the form 1-12-1993 then
0
SELECT *
FROM EMPLOYE
WHERE Birthdate <= 1996 AND Birthdate >= 1992;
0
Then replace Birthdate by CONVERT( TO_CHAR( Birthdate, 'YYYY' ), NUMBER )
0
Select * from employe where birthdate between '1-1-1992' and '31-12-1996';
Maybe :-)