易截截图软件、单文件、免安装、纯绿色、仅160KB

记录一些sql语句oracle的

 select d.code,d.name, sum(w.weight) weight,round(avg(w.price),2) price,sum(w.money) money
from weight_info w left outer join t_dict d on w.productcode=d.code left outer  join t_balancecode b on w.balancecode=b.balancecode where 1=1 and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', 'yyyy-mm-dd hh24:mi:ssxff') group by d.code ,d.name
select to_char(trunc(w.operdate,'mm'),'yyYY'), sum(w.weight),avg(w.price),sum(w.money)
from weight_info w left outer join t_dict d on w.productcode=d.code left outer  join t_balancecode b on w.balancecode=b.balancecode
where 1=1 and d.code='100' and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', 'yyyy-mm-dd hh24:mi:ssxff') group by d.name,trunc(w.operdate,'mm') ;


相关文档:

航空公司管理系统(VC++ 与SQL 2005)

系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
      这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......

Oracle快照

 --名词说明:源——被同步的数据库
            目的——要同步到的数据库
前6步必须执行,第6以后是一些辅助信息.
--1、在目的数据库上,创建dblink
drop public database link dblink_orc92_182;
Create public DATABASE LINK dbl ......

Oracle select in/exists/not in/not exits

in 是把外表和内表作hash 连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询。
一直以来认为exists比in效率高的说法是不准确的。
如果查询的两个表大小相当,那么用in和exists差别不大。
in 是把外表和内表作hash
连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询。
一直以 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号