OracleÖÐdateÐÍÊý¾Ý¼ìË÷
ÓÃdateÐÍ×ֶνøÐÐÊý¾Ý¼ìË÷ʱÐèҪעÒ⣺Êý¾Ý¸ñʽ»¯£¡
´ËÊý¾Ý¸ñʽ»¯²»Í¬ÓÚÓÃSimpleDateFormat("yyyy-MM-dd")¶ÔÏó½øÐиñʽ»¯£¬¶øÊÇÓÃOracleµÄÄÚÖú¯Êýto_date()
»ò±êʶ·ûdateÀ´¸ñʽ»¯¡£
ÀýÈ磺
Óиö×Ö¶ÎÊÇdateÊý¾Ý£¬ÎÒÏë²éѯijijÄê¶ÈµÄÊý¾Ý¡£
´íÎóд·¨£ºselect * from table_Name where col_Name > '2009-10-14';
select * from table_Name where col_Name like
'2006%';
ÕâÑù¾Í±¨£ºora-01861 ÎÄ×ÖÓë¸ñʽ×Ö·û´®²»Æ¥Å䣡
Õýȷд·¨£º1. ¼Óto_date()º¯Êý
select * from table_Name where col_Name >
to_date('2009-10-14','yyyy-MM-dd');
2. ¼Ódate±êÖ¾
select *
from table_Name where col_Name > date'2009-10-14';
3. ¼Óto_char()º¯Êý(ÕâÑùʹÓò»ÁËË÷Òý£¬Ó°ÏìÐÔÄÜ£¬Ò»°ã²»½¨ÒéÕâÑùʹÓÃ)
select * from table_Name where
to_char(col_Name,'yyyy-MM-dd') like '2006%';
Ïà¹ØÎĵµ£º
ËÄ¡¢ÁªºÏÊý×éµÄʹÓ÷½·¨
ÁªºÏÊý×éÒÔÇ°±»³ÆΪPL/SQL±í¡£ÔÚ±íÖв»ÄÜʹÓÃÁªºÏÊý×飬ֻÄܽ«ËüÃÇÓÃ×÷³ÌÐòÉè¼ÆµÄ½á¹¹Ìå¡£Ö»ÄÜÔÚPL/SQLÖзÃÎÊÁªºÏÊý×é¡£
×¢Òâµ½ÁªºÏÊý×é´øÀ´µÄһЩ¹Ø¼üÎÊÌâÊǷdz£ÖØÒªµÄ¡£ÕâЩÎÊÌâʹÎÒÃǽéÉÜËüÃǵÄÓ÷¨Ê±£¬ÐèÒª²ÉȡһЩÌرðµÄ·½·¨¡£ÕâЩÎÊÌâ°üÀ¨£º
ÁªºÏÊý×é²»ÐèÒª³õʼ»¯£¬Ò²Ã»Óй¹Ô캯ÊýÓï·¨¡£ÔÚ ......
ORACLE 10GµÄ¼¯ºÏAPI
¼¯ºÏAPI·½·¨×îÔçÊÇÔÚORACLE 8IÖÐÒýÈëµÄ¡£¼¯ºÏAPIÌṩÁ˼ò»¯·ÃÎʼ¯ºÏµÄ·½·¨¡£ÔÚORACLE 10GÒÔÇ°£¬ÕâЩ·½·¨È·Êµ¼ò»¯Á˶Լ¯ºÏµÄ·ÃÎÊ¡£µ«ÊÇ£¬²¢²»ÊÇ·ÇÒªÇóÕÆÎÕÕâЩ·½·¨²»¿É¡£´ÓORACLE 9IµÄINDEX-BY±íµ½ORACLE 10GµÄÁªºÏÊý×éµÄת»»£¬Ê¹ËüÃdzÉΪ±ØÐëÕÆÎյķ½·¨¡£
ÏÂÃæÊÇÎÒ´ÓÊéÉÏժ¼ÏµÄһР......
Oracle±¸·Ý¹ÜÀí
×î¼òµ¥µÄOracle Âß¼±¸·ÝÈí¼þ£¬Ç¿´óµÄ¼Æ»®±¸·Ý¼°ÈßÓ౸·Ý¹¦ÄÜ
Èí¼þÌØÉ«£º
1.ÂéȸËäС£¬ÎåÔà¾ãÈ«¡£±¾×ÅʵÓõĽǶȿª·¢Õâ¸öÈí¼þ£¬Í¬Ê±¼æ¹Ë½çÃæÓ빦ÄÜ
2.ÖÇÄÜ»¯±¸·Ý¹¦ÄÜ£¬µ÷ÓÃOracle µÄexp±¸·Ý¹¦ÄÜ£¬ÖÇÄܼì²â±¸·Ý²ÎÊý
3.ÖÇÄÜѹËõ±¸·ÝÎļþ£¬²»Óõ£Ðı¸·ÝÊý¾Ý¹ý´ó¶øÓ²Å̳ÔÁ¦
4.¼°Æä¼òµ¥µÄ²Ù×÷½çÃ棬¼¸·ÖÖÓ¼ ......
Oracle×Ô8iÆð¾ÍÈ«ÃæÖ§³Öjava£¬µ«¸÷¸ö°æ±¾µÄoracleÖÐĬÈÏjdk°æ±¾¾ù²»Ïàͬ£¬oracle8iÖÐΪ jdk1.2,oracle9iÖÐΪjdk1.3,oracle10gÖÐΪjdk1.4~~ÖÁ±ÊÕßÐÐΪ֮¼Ê£¬µ±Ç°µÄ×îа汾Ϊjdk1.5 update 11.
Òò±ÊÕßjava¿ª·¢³öÉí£¬ÔÚ×öoracle¿ª·¢Öо³£»áÓÃjavaÀ´À©Õ¹ oracle¹¦ÄÜ£¬µ«ÊÇÓÉÓÚoracle×Ô´øjdk°æ±¾¹ýµÍ£¬¿ÉÄÜ»áÔì³ÉһЩ ......
Êý¾Ý×Öµädict×ÜÊÇÊôÓÚOracleÓû§sysµÄ¡£
1¡¢Óû§£º
¡¡select username from dba_users;
¸Ä¿ÚÁî
¡¡alter user spgroup identified by spgtest;
2¡¢±í¿Õ¼ä£º
¡¡select * from dba_data_files;
¡¡select * from dba_tablespaces;//±í¿Õ¼ä
¡¡select tablespace_name,sum(bytes), sum(blocks)
from dba_ ......