mysql可以这样:INSERT into result(
select null,a.joincomday,a.name,b.name,a.bothday-b.bothday
from emplyee a,emplyee b
where a.joincomday=b.joincomday and a.name<>b.name and a.bothday-b.bothday>0);另外日期差可以用TO_DAYS()函数,然后相减。
select null,a.joincomday,a.name,b.name,a.bothday-b.bothday
from emplyee a,emplyee b
where a.joincomday=b.joincomday and a.name<>b.name and a.bothday-b.bothday>0);另外日期差可以用TO_DAYS()函数,然后相减。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货