Mysql日期
create view total as select s.organization_name,s.name,s.sex,s.identity_card_number,date_format(s.final_into_association_time,‘%Y-%m-%d‘),s.number_of_worked_in_association,(year(now())-year(s.begin_working_time)+s.number_of_worked_in_association) as years,s.duty_name,date_format(s.begin_working_time,‘%Y-%m-%d‘),s.state from staff_incumbency s,organization o where s.organization_name =o.name and duty_name =‘XX‘ and o.code like ‘_____0000‘ and (year(now())-year(s.begin_working_time)+s.number_of_worked_in_association) >=10; create view total2 as select o.code, s.organization_name,s.name,s.sex,s.identity_card_number,s.number_of_worked_in_association,s.state,date_format(s.dimission_time,‘%Y-%m-%d‘),s.dimission_duty_name from staff_dimission s,organization o where s.organization_name =o.name and s.dimission_duty_name =‘XX‘ and o.code like ‘_____0000‘ and s.number_of_worked_in_association >=10 order by o.code;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。