Oracle_»ñÈ¡×îÐÂÈÕÆÚµÄÊý¾Ý
Êý¾Ý¿âÊý¾Ý
ID
UserName
Date
1
User1
2010/4/27
1
User1
2010/4/11
1
User1
2010/4/1
ÒªÇó£º
»ñÈ¡×îÐÂÈÕÆÚµÄÒ»ÌõÊý¾Ý
SqlÓï¾ä£º
select t.* from tb t where date = (select max(date) from tb where id = t.id) order by t.id
Ïà¹ØÎĵµ£º
ÏîÄ¿ÖÐÓÐÉæ¼°´æ´¢¹ý³Ì¶Ô×Ö·û´®µÄ´¦Àí£¬ËùÒԾͽ«ÔÚÍøÉϲéÕÒµ½µÄ×ÊÁÏ»ã×Ü£¬×öÒ»¸öÐÅϢƴ½ÓʽµÄ×ܽᡣ
ÒÔÏÂÐÅÏ¢¾ùÀ´×Ô»¥ÁªÍø£¬Ìù³öÀ´Ò»Ôò×Ô¼º±£´æÒÔ´ýÒÔºóʹÓã¬Ò»Ôò¹©´ó¼Ò·ÖÏí¡£
×Ö·ûº¯Êý——·µ»Ø×Ö·ûÖµ
ÕâЩº¯ÊýÈ«¶¼½ÓÊÕµÄÊÇ×Ö·û×åÀàÐ͵IJÎÊý(CHR³ýÍâ)²¢ÇÒ·µ»Ø×Ö·ûÖµ.
³ýÁËÌرð˵Ã÷µÄÖ®Íâ,ÕâЩº¯Êý´ó²¿·Ö·µ» ......
1¡¢Í¨¹ýToad½«Êý¾Ý¿É½á¹¹Éú³ÉSQL£¨×¢ÒâÓû§£©¡£
[DataBase] [Export] [GenerateSchmaScript]
2¡¢´´½¨DBLink.
DROP PUBLIC DATABASE LINK "ROOT.US.ORACLE.COM";
CREATE PUBLIC DATABASE LINK "ROOT.US.ORACLE.COM"
&nb ......
1.½¨Á¢´æ·Å×Ö·û´®µÄÊý×éÀàÐÍ
create or replace type Type_bind as table OF VARCHAR2(4000)
2.½¨Á¢½«×Ö·û´®×ª³ÉÊý×éÈ»ºó·µ»Ø¸øType_bindº¯Êý¡£
CREATE OR REPLACE FUNCTION F_PUB_BIND_IN(p_bind IN VARCHAR2)
RETURN TYPE_BIND AS
/*
´´½¨Ê±¼ä:2008-8-26
ÔËÐÐÖÜÆÚ ......
ÎÒµÄmyeclipseÊÇ6.5°æ, oracleÊÇ10.2.0.1µÄÖÐÎÄ°æ.
myeclipseÆô¶¯ÊÇÓ¢ÎĵÄ,DB BrowserËÀ»îÁ¬²»ÉÏoracle,±¨Á½¸ö´íÎó(¾ßÌå²»¼ÇµÃÁË).ºóÀ´¿´ÁËÈçÏÂÎÄÕ£¬ÖªµÀÁËÔÒò¡£
---------------------------------------------------------------------------------------------------------------------------
Hi,
a ......
OracleÖÐto_date()Óë24СʱÖƱíʾ·¨¼°mm·ÖÖÓµÄÏÔʾ£º
ÔÚʹÓÃOracleµÄto_dateº¯ÊýÀ´×öÈÕÆÚת»»Ê±£¬ºÜ¶àJava³ÌÐòÔ±Ò²Ðí»áºÍÎÒÒ»Ñù£¬Ö±¾õµÄ²ÉÓÓyyyy-MM-dd HH:mm:ss”µÄ¸ñʽ
×÷Ϊ¸ñʽ½øÐÐת»»£¬µ«ÊÇÔÚOracleÖлáÒýÆð´íÎ󣺓ORA 01810 ¸ñʽ´úÂë³öÏÖÁ½´Î”¡£È磺
to_date('2005-01-01 13:14:20 ......