请问:sql中的
update a set a.mrts ==DATEDIFF(day,a.cdrq,b.rq) from FD_DAIRYCENTER.rep_gtzhqk a , FD_DAIRYCENTER.YZFZ_GNYW b
where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null;如何改为oracle语句?
update a set a.mrts ==DATEDIFF(day,a.cdrq,b.rq) from FD_DAIRYCENTER.rep_gtzhqk a , FD_DAIRYCENTER.YZFZ_GNYW b
where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null;如何改为oracle语句?
where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null;
where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null)
where exists(select 1 from FD_DAIRYCENTER.YZFZ_GNYW b where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null);
where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null)
where exists(select 1 from FD_DAIRYCENTER.YZFZ_GNYW b where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null);where exists(select 1 from FD_DAIRYCENTER.YZFZ_GNYW b where a.nh = b.nh and a.tc = b.tc and b.gnrq is not null);是子查询控制,update的数据集合范围
select '12' as mrybh,'12月'as mry into mrymc
insert into mrymc select '2' ,'02月'
在oracle中怎么实现?
在oracle中怎么实现?==================================insert into mrymc select '2','02月' from dual