我需要比较两列,两者都以 sysdate 作为值,但这
select count(*) from (
(select col from tab1)
minus
(select col from tab2 ) ) --
给出 1 ,但我希望它是 0
让我进一步澄清:
create table tab1 (col date)
-- Can the datatype of `col` be something else
-- rather than `date` so that when `SYSDATE`
-- gets inserted to it, I get only `10-MAY-17`
-- rather than the date along with time?
-- I have control on this create statement,
-- I can create the table as I wish to.
insert into tab1 values (sysdate)
-- I have no control on this,
-- this is system generated .
create table tab2 (col date)
-- I have control on it.
-- I can modify it.
insert into tab2(col) values (sysdate)
-- I have control on it to change it
如果问题仍然不清楚,请告诉我。谢谢