首页 > 代码库 > Mysql日期
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;
Mysql日期
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。