Code for Display student details born in year 1980 to 1982 using to_char() function in Oracle
select * from student where to_char(birthdate,'yyyy') in('1980','1981','1982');
Output:
ROLLNO NAME CLASS BIRTHDATE
---------- ------------- -------- ---------
4 Mona Amin B 08-APR-81
5 Tikku Thakkar B 15-DEC-82