Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle trunc º¯ÊýµÄʹÓÃ

OracleµÄtrunc º¯ÊýÒ»°ãÓÃÀ´ ¶ÔÈÕÆÚºÍʱ¼ä½øÐнØÈ¡¡£
 
1¡¢Êý×Ö´¦Àí ¡£½ØÈ¡
 
 select trunc(5.75),trunc(5.75,1),trunc(5.75,-1),trunc(556.234,-2) from dual;
 
 
Êä³ö:
TRUNC(5.75) TRUNC(5.75,1) TRUNC(5.75,-1) TRUNC(556.234,-2)
----------- ------------- -------------- -----------------
          5           5.7              0               500
 
2¡¢ÈÕÆÚ´¦Àí
ÈçÎÒÉèÖÃϵͳµ±Ç°ÈÕÆÚΪ2010-7-23
SQL> select trunc(sysdate,'yyyy'), round(sysdate,'yyyy') from dual;
 
TRUNC(SYSDATE, ROUND(SYSDATE,
-------------- --------------
01-1ÔÂ -10     01-1ÔÂ -11
ÉÏÃæÓï¾äÊǸù¾ÝÄê¶È½øÐÐ ½ØÈ¡£¬round ÔÚ7ÔÂ1ÈÕºó£¨yyyy£©,16ÈÕºó(mm)»á¼ÓÒ»


Ïà¹ØÎĵµ£º

oracle insertÓï·¨£¨ÈÕÆÚ¸ñʽ£©

insert into dts_auction_comments (id,auction_id,user_id,user_nick,comments,gmt_create,gmt_modified,status,comm_type)
                            values(409,127380, ......

JDBCÁ¬½ÓOracleµÄ¼òµ¥Àý×Ó

 1import java.sql.*;
 2import java.util.logging.Level;
 3import java.util.logging.Logger;
 4
 5/** *//**
 6 * Title: JDBCÁ¬½ÓÊý¾Ý¿â
 7 * Description: ±¾ÊµÀýÑÝʾÈçºÎʹÓÃJDBCÁ¬½ÓOracleÊý¾Ý¿â£¬²¢ÑÝʾÌí¼ÓÊý¾ÝºÍ²éѯÊý¾Ý.
 8 */
 9public class JDBCExampl ......

Ò»¸ö¼òµ¥µÄhibernateÁ¬½ÓoracleÊý¾Ý¿âÀý×Ó£¡

Ò»¡¢ Hibernate½éÉÜ
    HibernateÊÇ»ùÓÚ¶ÔÏó/¹ØϵӳÉ䣨ORM£¬Object/Relational Mapping£©µÄÒ»¸ö½â¾ö·½°¸¡£ORM·½°¸µÄ˼ÏëÊǽ«¶ÔÏóÄ£ÐͱíʾµÄ¶ÔÏóÓ³Éäµ½¹ØϵÐÍÊý¾Ý¿âÖУ¬»òÕß·´Ö®¡£HibernateÄ¿Ç°ÊÇORM˼ÏëÔÚJavaÖÐ×î³É¹¦¡¢×îÇ¿´óµÄʵÏÖ¡£ËüÓÚ2001ÄêµÄÄêÄ©·¢²¼µÚÒ»¸ö°æ±¾£¬Á¢¼´ÒýÆðÁ˹㷺µÄ×¢Òâ¡£2003Äê6Ô£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ