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³ÌÐòÉè¼ÆÖУ¬ÓÐÈýÖÖ¶¨Òå¼Ç¼ÀàÐ͵ķ½·¨£ºÒ»ÖÖÊÇʹÓÃ%ROWTYPEÊôÐÔ£»ÁíÒ»ÖÖÊÇÔÚPL/SQL³ÌÐòµÄÉùÃ÷²¿·ÖÏÔʾ¶¨Òå¼Ç¼ÀàÐÍ£»×îºóÒ»ÖÖ·½·¨Êǽ«¼Ç¼ÀàÐͶ¨ÒåΪÊý¾Ý¿â½á¹¹»ò¶ÔÏóÀàÐÍ¡£
ÎÒÏȼòµ¥µÄ½éÉÜÒ»¸öÏÂÃæÒªÓõ½µÄ±íµÄ½á¹¹£¨ºÚÌå±êÃ÷µÄ×Ö¶ÎΪÖ÷¼ü£©£º
INDIVIDUALS±í
INDIVIDUAL ID
FIRST NAME
MIDDLE_INITI ......
ËÄ¡¢ÁªºÏÊý×éµÄʹÓ÷½·¨
ÁªºÏÊý×éÒÔÇ°±»³ÆΪPL/SQL±í¡£ÔÚ±íÖв»ÄÜʹÓÃÁªºÏÊý×飬ֻÄܽ«ËüÃÇÓÃ×÷³ÌÐòÉè¼ÆµÄ½á¹¹Ìå¡£Ö»ÄÜÔÚPL/SQLÖзÃÎÊÁªºÏÊý×é¡£
×¢Òâµ½ÁªºÏÊý×é´øÀ´µÄһЩ¹Ø¼üÎÊÌâÊǷdz£ÖØÒªµÄ¡£ÕâЩÎÊÌâʹÎÒÃǽéÉÜËüÃǵÄÓ÷¨Ê±£¬ÐèÒª²ÉȡһЩÌرðµÄ·½·¨¡£ÕâЩÎÊÌâ°üÀ¨£º
ÁªºÏÊý×é²»ÐèÒª³õʼ»¯£¬Ò²Ã»Óй¹Ô캯ÊýÓï·¨¡£ÔÚ ......
ÕâƪÎÄÕÂÊÇORACLEÃæÊÔµÄÎÊÌâ½õ¼¯£¬ËäÈ»²»È«Ã棬µ«ÊÇÕâƪÎÄÕ»áÈÃÄãÖªµÀÈçºÎÈÃÃæÊÔ¿¼¹ÙÁ˽âÄã¶ÔORACLE¸ÅÄîµÄÊìϤ³Ì¶È¡£
1.½âÊÍÀ䱸·ÝºÍÈȱ¸·ÝµÄ²»Í¬µãÒÔ¼°¸÷×ÔµÄÓŵã
½â´ð£ºÈȱ¸·ÝÕë¶Ô¹éµµÄ£Ê½µÄÊý¾Ý¿â£¬ÔÚÊý¾Ý¿âÈԾɴ¦ÓÚ¹¤×÷״̬ʱ½øÐб¸·Ý¡£¶øÀ䱸·ÝÖ¸ÔÚÊý¾Ý¿â¹Ø±Õºó£¬½øÐб¸·Ý£¬ÊÊÓÃÓÚËùÓÐÄ£Ê ......
Oracle×Ô8iÆð¾ÍÈ«ÃæÖ§³Öjava£¬µ«¸÷¸ö°æ±¾µÄoracleÖÐĬÈÏjdk°æ±¾¾ù²»Ïàͬ£¬oracle8iÖÐΪ jdk1.2,oracle9iÖÐΪjdk1.3,oracle10gÖÐΪjdk1.4~~ÖÁ±ÊÕßÐÐΪ֮¼Ê£¬µ±Ç°µÄ×îа汾Ϊjdk1.5 update 11.
Òò±ÊÕßjava¿ª·¢³öÉí£¬ÔÚ×öoracle¿ª·¢Öо³£»áÓÃjavaÀ´À©Õ¹ oracle¹¦ÄÜ£¬µ«ÊÇÓÉÓÚoracle×Ô´øjdk°æ±¾¹ýµÍ£¬¿ÉÄÜ»áÔì³ÉһЩ ......
±¾ÊÓͼ°üÀ¨Shared poolÖÐSQLÓï¾äµÄÍêÕûÎı¾£¬Ò»ÌõSQLÓï¾ä¿ÉÄֳܷɶà¸ö¿é±»±£´æÓÚ¶à¸ö¼Ç¼ÄÚ¡£
V$SQLTEXTÖеij£ÓÃÁÐ
HASH_VALUE£ºSQLÓï¾äµÄHashÖµ
ADDRESS£ºsqlÓï¾äÔÚSGAÖеĵØÖ·
SQL_TEXT£ºSQLÎı¾¡£
PIECE£ºSQLÓï¾ä¿éµÄÐòºÅ
V$SQLTEXTÖеÄÁ¬½ÓÁÐ
Column View   ......