求助:一个简单的sql,是时间相减问题? select idfrom awhere trunc(date2,'j')-trunc(date1,'j')<=3 and trunc(date2,'j')-trunc(date1,'j')>0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select idfrom awhere date2 - date1 <= 3 好像是库有问题我在同一台机器上的其他库下确实也可以相减但是这个库(姑且称为库AA)不行奇怪啊好像好多有关于日期的操作都出错表结构我看了,确实是DATE类型 select date2 - date1 from a查出来是什么结果? where trunc(date2,'j')-trunc(date1,'j') between 0 and 3 select * from AAwhere trunc(date2 -date1,J)Andbetween 0 and 3 select * from AAwhere trunc(date2 -date1,0)Andbetween 0 and 3 select id from a where abs(date2-date1)<=3; 谢谢 RHKylix(<要把金针度与人>),ok 其他人的还是不行 use datediff() funselect id from tableName where datediff(day,date1,date2) 求助!!!关于ORA-24338:未执行语句句柄 注册表中的orcle删不了 数据库为什么变慢了? oracle版本 10.2.0.2.0 bug 如何在存储过程中实现connect user/userpassword@connectstring功能 求教个表合并问题 oracle 在win2000中只能装在administrator里吗? 急,急,各位大侠救救我! 如何建立一个数据库,一个表?多谢!送100! ORACLE varchar2(10 char)占多少字节 情人节到了,散分啦! 数据库连接问题 oracle10g
from a
where date2 - date1 <= 3
我在同一台机器上的其他库下确实也可以相减
但是这个库(姑且称为库AA)不行
奇怪啊
好像好多有关于日期的操作都出错
表结构我看了,确实是DATE类型
from a查出来是什么结果?
where trunc(date2,'j')-trunc(date1,'j') between 0 and 3
from AA
where trunc(date2 -date1,J)And
between 0 and 3
from AA
where trunc(date2 -date1,0)And
between 0 and 3
RHKylix(<要把金针度与人>),ok
其他人的还是不行