بتاريخ: 4 يونيو 200520 سنة comment_38166 If we want a list for the employee that have started the work in 1985 then we type the following order : Select ename , hiredate From emp Where to_char (hiredate,'yyyy') = 1985 ; And if we want them they have started working in the third month and in the year 1985 the we use the folloeing : Select ename , hiredate From emp Where to_char(hiredate , 'yyyy') = 1985 And to_char(hiredate,'mm') = 03 ; You can here see all employess and hiredate in day and month and in years . Select initcap(ename), hiredate , Trunc((sysdate-hiredate)/365,0) years , Trunc(mod((sysdate-hiredate),365)/30,0) Months , Trunc(mod(mod((sysdate-hiredate),365),30),0) Days from emp ; thank you very much for all ................. تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.