oracleÖ®°Ñ±íÎļþµ¼³ö³ÉÎı¾Îļþ
1 spool
spool d:\test\table.dat
select * from table_name;
spool off
2 sqlplus user/password@sid @test.sql > table.dat
test.sql
select * from table_name;
exit;
Ïà¹ØÎĵµ£º
À´Ô´£¨http://www.javaeye.com/topic/190221£©
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07 ......
OracleÊý×Ö×Öµä°üº¬Ò»¸öÏÊΪÈËÖªµÄv$session_longopsÊÓͼ¡£v$session_longopsÊÓͼ¿ÉÒÔʹOracleר¼Ò¼õÉÙÔËÐÐʱ¼äºÜ³¤µÄDDLºÍDMLÓï¾äµÄÔËÐÐʱ¼ä¡£
¡¡¡¡
¡¡¡¡
¡¡¡¡
¡¡¡¡ÀýÈçÔÚÊý¾Ý²Ö¿â»·¾³ÖУ¬¼´Ê¹Ê¹Óò¢ÐÐË÷Òý´´½¨¼¼Êõ£¬¹¹½¨Ò»¸öºÜ¶àG×Ö½Ú´óµÄË÷ÒýÐèÒªºÄ·ÑºÜ¶à¸öСʱ¡£ÕâÀïÄã¾Í¿ÉÒÔ²éѯv$session_longopsÊÓͼ¿ìËÙÕÒ³öÒ»¸ ......
SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii(’A’) A,ascii(’a’) a,ascii(’0’) zero,ascii(’ ’) space from dual;&nb ......
Oracle µÄ 9i/10g ÖÐÒѾ¶ÔÄÚ´æ¹ÜÀíÖð²½×öÁ˺ܴóµÄ¼ò»¯£¬11g Ôò¸ü½øÒ»²½£¬ÒýÈëÁËÒ»¸öеĸÅÄî×Ô¶¯»¯ÄÚ´æ¹ÜÀí(Automatic Memory Management,AMM) . Èç¹û DBA ÕæµÄÏë͵ÀÁµÄ»°£¬Ö»ÐèÒªÉ趨Á½¸ö²ÎÊý¾Í¿ÉÒÔ°Ñ·³ÐĵÄÊÂÇé¶¼½»¸ø Oracle ÕÛÌÚÁË(Ö»Òª DBA ×ã¹»ÐÄ¿í)¡£PGA Óë SGA Ò»Æð¸ã¶¨¡£ÕâÁ½¸ö²ÎÊý·Ö±ðÊÇ£º
MEMORY_TARGET--²Ù×÷Ï ......
oracle ÈÕÆÚº¯Êý
ÔÚoracleÊý¾Ý¿âµÄ¿ª·¢ÖУ¬³£ÒòΪʱ¼äµÄÎÊÌâ´ó·ÑÖÜÕ£¬ËùÒÔÌØµØ½«ORACLEÊý¾ÝµÄÈÕÆÚº¯ÊýÊÕ²ØÖ´ˡ£Ä˹©
ËûÈÕËù²éÒ²¡£
add_months(d,n) ÈÕÆÚd¼Ón¸öÔÂ
last_day(d) °üº¬dµÄÔÂ?µÄ×îºóÒ»ÌìµÄÈÕÆÚ
new_time(d,a,b) a?ÇøµÄÈÕÆÚºÍ??dÔÚb?ÇøµÄÈÕÆÚºÍ??
next_day(d,day) ±È ......