oracle查询本月的所有记录,其中有一字段是日期 例如:表a,有三列数,id,name,createdate 要求是查出所有本月的记录数 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from 表awhere trunc(createdate,'month')=trunc(sysdate,'month') select * from awhere time between '2011-01-01'and '2011-01-31';这样也可以的 select * from 表awhere trunc(sysdate,'month')=trunc(createdate,'month')sysdate放在前面 select count(docid) as letterMonthProcessedTotal from wsxf_document where create_date <=(select to_char(last_day(sysdate),'yyyy-MM-dd') from dual select id,name,createdate from a where createdate>=trunc(sysdate,'mm') 几道DBA面试题,大家可以做一做 oracle 函数问题 如何修改 oracle10G 默认的1521端口 高分求一查询语句 事务中不提交或不回滚会造成连接上的内存泄漏吗? 在线求救 解决了马上给分!!! oracle 9i Linux 下安装时出现 无法建立inventory目录,你可能没有相应权限,请高手帮忙,100分相送 是专找 有两种以上商品的供应商 A这样的供应商很多 oraedit pro 软件注册 多表连接有时左表记录多有时右表记录多咋办 客户端连接oracle为什么无法正常生成SQL-TRACE SQLSERVER2008R Nchar数据插入ORACLE字符长度问题
select * from 表a
where trunc(createdate,'month')=trunc(sysdate,'month')
select * from a
where time between '2011-01-01'and '2011-01-31';
这样也可以的
where trunc(sysdate,'month')=trunc(createdate,'month')sysdate放在前面