oracle ÈÕÆÚ¹ÜÀíº¯Êý
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) ±ÈÈÕÆÚd?£¬ÓÉdayÖ¸¶¨µÄÖܼ¸µÄÈÕÆÚ
sysdate µ±Ç°µÄϵ?ÈÕÆÚºÍ??
greatest(d1,d2,...dn) ?³öµÄÈÕÆÚÁбíÖÐ×îºóµÄÈÕÆÚ
least(d1,k2,...dn) ?³öµÄÈÕÆÚÁбíÖÐ×îÔçµÄÈÕÆÚ
to_char(d [,fmt]) ÈÕÆÚd°´fmtÖ¸¶¨µÄ¸ñʽ??³É×Ö·û´®
to_date(st [,fmt]) ×Ö·û´®st°´fmtÖ¸¶¨µÄ¸ñʽ?³ÉÈÕÆÚ?£¬ÈôfmtºöÂÔ£¬stÒªÓÃȱʡ¸ñʽ
round(d [,fmt]) ÈÕÆÚd°´fmtÖ¸¶¨¸ñʽÉáÈëµ½×î½üµÄÈÕÆÚ
trunc(d [,fmt]) ÈÕÆÚd°´fmtÖ¸¶¨¸ñʽ½Ø¶Ïµ½×î½üµÄÈÕÆÚ
to_date ×Ö·û´®ÀàÐÍתΪ»»ÈÕÆÚÀàÐÍ
×Ö·û´®ÖеÄÏàӦλÖÃÉϵÄ×Ö·û,±ØÐë·ûºÏʱ¼ä·¶Î§µÄÏÞÖÆ
²éѯOracleÈÕÆÚ¸ñʽ
----------------------------------
select * from nls_database_parameters;
µÃµ½½á¹ûÈçϱí: ±íÖÐNLS_DATE_FORMAT±íʾÈÕÆÚ¸ñʽ.
PARAMETER VALUE
----------------------------------- -----------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS16GBK
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_NCHAR_CHARACTERSET ZHS16GBK
NLS_RDBMS_VERSION 8.1.7.0.0
»òÕß²éѯV$NLS_PARAMETERS±í,
select * from V$NLS_PARAMETERS;
Ò²ÓÐÀàËƽá¹û
SQL>select to_date('2004-11-12 12-07-32','yyyy-mm-dd hh24-mi-ss') value from dual;
VALUE
-------------------
2004.11.12 12:07:32
SQL>select to_date('20041015') value from dual;
VALUE
-------------------
2004.10.15 00:00:00
SQL>select to_date('20041315') value from dual;
ERROR λ
Ïà¹ØÎĵµ£º
ÁÙʱ±íµÄ¸ÅÄ
ÔÚOracleÊý¾Ý¿âÖл¹ÓÐÒ»ÖÖÀàÐÍµÄ±í£¬½Ð×öÁÙʱ±í¡£Õâ¸öÁÙʱ±í¸úÓÀ¾Ã±í×î´óµÄÇø±ð¾ÍÊDZíÖеÄÊý¾Ý²»»áÓÀÔ¶µÄ´æÔÚ¡£µ±Ò»¸ö»á»°½áÊø»òÕßÊÂÎñ½áÊøµÄʱºò£¬Õâ¸öÁÙʱ±íÖеÄÊý¾Ý£¬²»ÓÃÓû§×Ô¼ºÉ¾³ý£¬Êý¾Ý¿â×Ô¼º»á×Ô¶¯Çå³ý¡££¨±íÊÇÈ«¾Ö£¬Ö»ÊÇÊý¾ÝÏûʧ£©
O ......
ORACLEÏÂɾ³ýµ±Ç°Óû§ÏÂËùÓжÔÏóµÄSQL
Sql´úÂë
--ɾ³ýij¸öÓû§ÏµĶÔÏó
set heading off;
set feedback off;
spool c:\dropobj.sql;
prompt --Drop constraint
select 'alter t ......
¿ªÔ´¿çƽ̨±à³ÌÓïÑÔJava¼ÓÉÏ¿ªÔ´Êý¾Ý¿âMySQL£¡×ÔSunÊÕ¹ºMySQL¿ªÊ¼£¬±¾ÒÔΪSun½«´óÕ¹ºêͼ¡£È»SunȴûÓаÑÎÕ»ú»á£¬·´¶øûÓнûµÃס½ðÈÚΣ»úµÄ³å»÷¡£ÂäµÃ¸öÃæÁÙÊÕ¹ºµÄ¾ÖÃæ¡£»òÐíMySQLÖ®¸¸Richard StallmanÒ²¾ø¶ÔûÓÐÏëµ½£¬ÈÃSunÊÕ¹ºMySQL£¬È´ÊÇ°ÑMySQLÍÆÏòÁËÉîÔ¨¡£MySQLµÄºÎÈ¥ºÎ´Ó£¡
Ãæ¶ÔÕâ¸öÎÊÌ⣬MySQLÖ ......
OracleÊý×Ö×Öµä°üº¬Ò»¸öÏÊΪÈËÖªµÄv$session_longopsÊÓͼ¡£v$session_longopsÊÓͼ¿ÉÒÔʹOracleר¼Ò¼õÉÙÔËÐÐʱ¼äºÜ³¤µÄDDLºÍDMLÓï¾äµÄÔËÐÐʱ¼ä¡£
¡¡¡¡
¡¡¡¡
¡¡¡¡
¡¡¡¡ÀýÈçÔÚÊý¾Ý²Ö¿â»·¾³ÖУ¬¼´Ê¹Ê¹Óò¢ÐÐË÷Òý´´½¨¼¼Êõ£¬¹¹½¨Ò»¸öºÜ¶àG×Ö½Ú´óµÄË÷ÒýÐèÒªºÄ·ÑºÜ¶à¸öСʱ¡£ÕâÀïÄã¾Í¿ÉÒÔ²éѯv$session_longopsÊÓͼ¿ìËÙÕÒ³öÒ»¸ ......
OracleÊý¾Ý¿âÖÐÌṩÁËͬÒå´Ê¹ÜÀíµÄ¹¦ÄÜ¡£Í¬Òå´ÊÊÇÊý¾Ý¿â·½°¸¶ÔÏóµÄÒ»¸ö±ðÃû£¬¾³£ÓÃÓÚ¼ò»¯¶ÔÏó·ÃÎʺÍÌá¸ß¶ÔÏó·ÃÎʵݲȫÐÔ¡£ÔÚʹÓÃͬÒå´Êʱ£¬OracleÊý¾Ý¿â½«Ëü·Òë³É¶ÔÓ¦·½°¸¶ÔÏóµÄÃû×Ö¡£ÓëÊÓͼÀàËÆ£¬Í¬Òå´Ê²¢²»Õ¼ÓÃʵ¼Ê´æ´¢¿Õ¼ä£¬Ö»ÓÐÔÚÊý¾Ý×ÖµäÖб£´æÁËͬÒå´ÊµÄ¶¨Òå¡£ÔÚOracleÊý¾Ý¿âÖеĴ󲿷ÖÊý¾Ý¿â¶ÔÏó£¬Èç±í¡¢ÊÓͼ¡¢Í ......