OracleÈÕÆÚº¯Êý²Ù×÷(ÊÕ¼¯ÕûÀí°æ)
¾³£ÔÚƽʱµÄ¿ª·¢ÖÐÒªÓõ½oracleµÄÈÕÆÚº¯Êý£¬Ã¿´Î¶¼ÒªÉÏÍøÈ¥²é£¬ÏÖÔÚÓеãʱ¼ä£¬×Ô¼ºÊÕ¼¯ÕûÀíÁËһϡ£ÌùÔÚÕâÀ·½±ã×Ô¼º£¬Ò²·½±ã´ó¼Ò¡£
----------------------------------------------------------------------------------------------------------------------------------
³£ÓÃÈÕÆÚÐͺ¯Êý
1¡£Sysdate µ±Ç°ÈÕÆÚºÍʱ¼ä SQL> Select sysdate from dual;
2¡£Last_day() ʱ¼äËùÔÚÔµÄ×îºóÒ»Ìì SQL> Select last_day(sysdate) from dual;
3¡£Add_months(d,n) µ±Ç°ÈÕÆÚdºóÍÆn¸öÔ ÓÃÓÚ´ÓÒ»¸öÈÕÆÚÖµÔö¼Ó»ò¼õÉÙһЩÔÂ·Ý date_value:=add_months(date_value,number_of_months)
SQL> Select add_months(sysdate,2) from dual;
4¡£Months_between(f,s) ÈÕÆÚfºÍs¼äÏà²îÔÂÊý
SQL> select months_between(sysdate,to_date('2005-11-12','yyyy-mm-dd'))from dual;
5¡£NEXT_DAY(d, day_of_week) ·µ»ØÓÉ"day_of_week"ÃüÃûµÄ£¬ÔÚ±äÁ¿"d"Ö¸¶¨µÄÈÕÆÚÖ®ºóµÄµÚ¼¸¸ö¹¤×÷ÈÕµÄÈÕÆÚ ¡£²ÎÊý"day_of_week"±ØÐëΪ¸ÃÐÇÆÚÖеÄijһÌì¡£
SELECT next_day(to_date('20050620','YYYYMMDD'),1) from dual;
select next_day(sysdate,3) from dual;±íʾµÚÈý¹¤×÷ÈÕ,Íâ¹úµÚÒ»¸ö¹¤×÷ΪÖÜÈÕ¡£×¢ÒâÈç¹û½ñÌìÊÇÖÜÒ»£¬Ôò±íʾÕâÖܵÄÖܶþ£¬Èç¹ûÕâÖÜÖܶþÒѾ¹ýÁË£¬Ôò±íʾÏÂÖܵÄÖܶþ
6¡£current_date()·µ»Øµ±Ç°»á»°Ê±ÇøÖеĵ±Ç°ÈÕÆÚ date_value:=current_date SQL> column sessiontimezone for a15 SQL> select sessiontimezone,current_date from dual;
SQL> alter session set time_zone='-11:00' 2 / »á»°ÒѸü¸Ä¡£ SQL> select sessiontimezone,current_timestamp from dual;
7¡£current_timestamp() ÒÔtimestamp with time zoneÊý¾ÝÀàÐÍ·µ»Øµ±Ç°»á»°Ê±ÇøÖеĵ±Ç°ÈÕÆÚ
SQL> select current_timestamp from dual;
8¡£dbtimezone()·µ»ØʱÇø SQL> select dbtimezone from dual;
9¡£extract()ÕÒ³öÈÕÆÚ»ò¼ä¸ôÖµµÄ×Ö¶ÎÖµ date_value:=extract(date_field from [datetime_value|interval_value])
SQL> select extract(month from sysdate) "This Month" from dual;
SQL> select extract(year from add_months(sysdate,36)) " Years" from dual;
Years ---------- 2008
10¡£localtimestamp()·µ»Ø»á»°ÖеÄ
Ïà¹ØÎĵµ£º
¡¡¡¡1. Oracle°²裝Íê³ÉºóµÄ³õʼ¿ÚÁ
¡¡¡¡internal/oracle
¡¡¡¡sys/change_on_install
¡¡¡¡system/manager
¡¡¡¡scott/tiger
¡¡¡¡sysman/oem_temp
¡¡¡¡2. ORACLE9IAS WEB CACHEµÄ³õʼĬÈÏÓû§ºÍÃÜÂ룿
¡¡¡¡administrator/administrator
¡¡¡¡3. oracle 8.0.5Ôõô´´½¨Êý¾Ý¿â£¿
¡¡¡¡ÓÃorainst¡£Èç¹ûÓ ......
PowerBuilderÈ¡µÃ¾Þ´ó³É¾ÍµÄÔÒò¾ÍÊÇÓй¦ÄÜÇ¿´óºÍÁé»î¶à±äµÄDatawindow¶ÔÏ󣬱¾ÈËÓÃPowerBuilder¿ª·¢¹ýÒ»¶Îʱ¼äºó£¬×ܽá³öһЩ¼¼ÇÉ£¬ÒÔ¹©¹ã´óµÄPB¿ª·¢Õß½è¼øʹÓá£
1¡¢ ÈçºÎ´´½¨Ò»¸ö¾ßÓÐÖð½¥µÝÔöÇóºÍ¹¦Äܵı¨±í£¬ÈçÏÂÐÎʽ£º Running TotalÁУ¬ÎÒÃÇ¿ÉʹÓüÆËãÁУºCumulativeSum£¨Quantity for all£©£¬¼´¿É´ïµ½Öð½¥µÝÔöÇóºÍ ......
°²×°oracleʱ£¬ÓÉÓÚ·´¸´°²×°Ð¶ÔØ£¬Óöµ½·þÎñûÓÐжÔز»ÄܼÌÐø°²×°µÄÎÊÌ⣬´ÓÍøÉÏÕÒµ½ÁË×ÊÁÏ£¬Å¶ªÊ§ÔÚ´ËתÔØһϣ¬ÄÚÈÝÈçÏÂ:
Èç¹ûÄãÒ²ºÍÎÒÒ»Ñù£¬Óù¤¾ß´´½¨ÁËÒ»¸ö·þÎñ£¬Ïëɾ³ýʱȴ·¢ÏÖɾ³ý²»µô¡£»òÕß°²×°ÁËDameWare Mini Remote ÒԺ󣨰üÀ¨×Ô¼º°²×°»òÕß»úÆ÷±»ºÚ£©ÔÚ·þÎñÀïÓÐÒ»¸ö“DameWare Mini Remote Control” ......
µÚÒ»ÖÖ£º
select * from SOME_TABLE sample(1) where rownum <= 10;
µÚ¶þÖÖ£º
select * from (select * from SOME_TABLE order by dbms_random.value) where rownum<=10;
µÚÈýÖÖ£º
select * from (select * from SOME_TABLE order by sys_guid()) where rownum <= 10; ......
×î½ü×öÁ˸öÏîÄ¿£¬ÊµÏÖ¶Ô´æÔÚǧÍòÌõ¼Ç¼µÄ¿â±í½øÐвåÈë¡¢²éѯ²Ù×÷¡£ÔÒÔΪ¶ÔÊý¾Ý¿âµÄ²åÈë¡¢²éѯÊǼþºÜÈÝÒ×µÄÊ£¬¿É²»Öªµ±Êý¾Ý´ïµ½°ÙÍòÉõÖÁǧÍòÌõ¼¶±ðµÄʱºò£¬ÕâÒ»ÇÐËƺõ±äµÃÏ൱À§ÄÑ¡£¼¸¾ÕÛÌÚ£¬×ÜËãÍê³ÉÁËÈÎÎñ¡£
1¡¢ ±ÜÃâʹÓÃHibernate¿ò¼Ü
HibernateÓÃÆðÀ´ËäÈ»·½±ã£¬µ«¶ÔÓÚº£Á¿Êý¾ÝµÄ²Ù×÷ÏÔµÃÁ¦²»´ÓÐÄ¡£
¹ØÓÚ²åÈ룺
......