oracle cast() º¯ÊýÎÊÌâ
oracle cast() º¯ÊýÎÊÌâ
SQL> create table t1(a varchar(10));
Table created.
SQL> insert into t1 values ('12.3456');
1 row created.
SQL> select round(a) from t1;
ROUND(A)
----------
12
SQL> select round(a,3) from t1;
ROUND(A,3)
----------
12.346
SQL> select cast(a as int) from t1;
CAST(AASINT)
------------
12
SQL> select cast(a as number(8,4)) from t1;
CAST(AASNUMBER(8,4))
--------------------
12.3456
=========================================================
cast ÊǽøÐÐÀàÐÍת»»µÄ, ¿ÉÒÔÕë¶Ô¸÷ÖÖOracleÊý¾ÝÀàÐÍ. Ð޸ĵÄÊÇÓû§µÄÊý¾ÝÀàÐÍ.
roundÖ»ÊÇÐ޸ĵÄÊý¾ÝÏÔʾ¸ñʽ. ¶ÔÊý¾Ý×öËÄÉáÎåÈë. ÀàËÆµÄº¯Êý»¹ÓÐceil(È¡´ËÊý¾ÝµÄ×îСÕûÊý). trunc( È¡Õûº¯Êý.)
¸´ÖÆÄÚÈݵ½¼ôÌù°å
´úÂë:
SQL> select round(12.45) round,trunc(12.45) trunc,ceil(12.45) ceil
2 from dual
3 /
ROUND TRUNC CEIL
---------- ---------- ----------
12 12 13
SQL> select round(12.54) round,trunc(12.54) trnc,ceil(12.54) ceil
2 from dual
3 /
ROUND TRNC CEIL
---------- ---------- ----------
13 12 13
Ïà¹ØÎĵµ£º
Upgrade Oracle 9i RAC to Oracle 10g RAC
by Vincent Chan
This article provides the procedures for converting Oracle 9i (9.2.0.4) RAC to Oracle 10g (10.2.0.1) RAC on Red Hat Enterprise Linux 3 (RHEL3).
Oracle Database 10g and Oracle Real Application Cluster (RAC) 10g itself, boast many new and ex ......
ÍÆ¼öcrs°æ±¾¸ßÓÚdb°æ±¾
If you also plan to apply this patch to Oracle Clusterware,
ensure that you apply the patch to Oracle Clusterware before
applying it to Oracle Database. This is because Oracle Clusterware
hould always be at the same or later version as the database.
Éæ¼°µ½Êý¾Ý¿â¶ø²»ÊÇʵÀýµ ......
ÔÚOracle8i»òÒÔÉϰ汾ÖУ¬¿ÉÒÔ´´½¨ÒÔÏÂÁ½ÖÖÁÙʱ±í£º
1¡£»á»°ÌØÓеÄÁÙʱ±í
CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>)
&nbs ......
Ó¦ÓÃÊý¾Ý¿âÖмǼÖÐdateÁÐĪÃûÆäÃîµÄ³öÏÖÁ˼¸¸öֵΪ0000-00-00µÄÊý¾Ý¡£
¸ü¿ÉŵÄÊÇÈç¹û½«ÕâÑùµÄ¼Ç¼½øÐжÁÈ¡³ÉΪvarchar2ºóÔÙto_dateת»»»ØÈ¥¾Í»á±¨´í¡£
ÎÊÌâÎÞ´Ó²éÆð£¬Ö»ËµÒ»ÏÂ×îÖÕͬÊÂËÑË÷µ½µÄÁ¬½Ó½á¹û£ºhttp://www.hellodba.com/Doc/oracle_date_zero_bug.htm
¿´À´µÄÈ·ÊÇoracleµÄÒ»¸öbug¡£
ÁíÍâÐèҪעÒâµÄÊÇ£¬ÔÚʹÓà ......
ÏÈ¿´Ò»¶ÎORACLE¹Ù·½Îĵµ
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/analysis.htm#25806:
FIRST/LAST Functions
The FIRST/LAST aggregate functions allow you to return the result of an aggregate applied over a set of rows that rank as the first or last with respect to a ......