摘要: 选出当天的日期的数据select * from test_table where to_char(datetime, 'yyyy-mm-dd')=to_char(sysdate,'yyyy-mm-dd');要想改变查询的结果,可以用 (case when then else end) as 句式select (case when to_char(datetime, 'yyyy-mm-dd')=to_char(sysdate,'yyyy-mm-dd') then '今日' else '非今日' end 阅读全文
posted @ 2013-09-03 16:49 holycrap 阅读(168) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/wangbin/archive/2008/10/09/1307190.html 阅读全文
posted @ 2013-09-03 14:39 holycrap 阅读(95) 评论(0) 推荐(0) 编辑
摘要: #!/bin/kshfunction xxxxxxxx{ sqllog=/home/oracle/sqllog.log su - oracle -c "sqlplus / as sysdba >${sqllog} "<< EOFCREATE OR REPLACE PROCEDURE COMPARE_TABLESASinde number;ndeplevel number;BEGIN inde:=1; ndeplevel:=1000; while inde <= ndeplevel loop xxxxxxxxxxxxxxxx; commit; inde 阅读全文
posted @ 2013-09-03 09:54 holycrap 阅读(151) 评论(0) 推荐(0) 编辑