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

Oracle ³£Óú¯Êý תÌû


nvl( ) º¯Êý
ʾÀý Çë²ÎÔÄ
´ÓÁ½¸ö±í´ïʽ·µ»ØÒ»¸ö·Ç null Öµ¡£
Óï·¨
NVL(eExpression1, eExpression2)
²ÎÊý
eExpression1, eExpression2
Èç¹û eExpression1 µÄ¼ÆËã½á¹ûΪ null Öµ£¬Ôò NVL( ) ·µ»Ø eExpression2¡£Èç¹û eExpression1 µÄ¼ÆËã½á¹û²»ÊÇ null Öµ£¬Ôò·µ»Ø eExpression1¡£eExpression1 ºÍ eExpression2 ¿ÉÒÔÊÇÈÎÒâÒ»ÖÖÊý¾ÝÀàÐÍ¡£Èç¹û eExpression1 Óë eExpression2 µÄ½á¹û½ÔΪ null Öµ£¬Ôò NVL( ) ·µ»Ø .NULL.¡£
·µ»ØÖµÀàÐÍ
×Ö·ûÐÍ¡¢ÈÕÆÚÐÍ¡¢ÈÕÆÚʱ¼äÐÍ¡¢ÊýÖµÐÍ¡¢»õ±ÒÐÍ¡¢Âß¼­ÐÍ»ò null Öµ
˵Ã÷
ÔÚ²»Ö§³Ö null Öµ»ò null ÖµÎ޹ؽôÒªµÄÇé¿öÏ£¬¿ÉÒÔʹÓà NVL( ) À´ÒÆÈ¥¼ÆËã»ò²Ù×÷ÖÐµÄ null Öµ¡£
select nvl(a.name,'¿ÕµÃ') as name from student a join school b on a.ID=b.ID
×¢Ò⣺Á½¸ö²ÎÊýµÃÀàÐÍҪƥÅä
isNaN º¯Êý
isNaN(expression:Object) : Boolean
¼ÆËã²ÎÊý£¬Èç¹ûֵΪ NaN£¨·ÇÊý×Ö£©£¬Ôò·µ»Ø true¡£´Ëº¯Êý¿ÉÓÃÓÚ¼ì²éÒ»¸öÊýѧ±í´ïʽÊÇ·ñ³É¹¦µØ¼ÆËãΪһ¸öÊý×Ö¡£
¼ì²âÊäÈëµÄÊÇ·ñµÄÊý×Ö£º
function checknum()
{
if ( isNaN (frm.num.value))
{
alert("ÇëÊäÈëÊý×Ö");
frm.num.focus();
}
 
 lpad º¯Êý
ÔÚ Oracle /PLSQLÖÐ, lpad º¯Êý½«×ó±ßµÄ×Ö·û´®Ìî³äһЩÌض¨µÄ×Ö·û,
ÆäÓï·¨¸ñʽÈçÏ£º    
  lpad ( string1, padded_length, [ pad_string ] )
×÷Ó㺰ÑaddStringÌí¼Óµ½aµÄ×ó±ß£¬length ÊÇ·µ»ØÖµµÄ³¤¶È
3Àý×Ó
                  A £º SQL> select lpad ('test',8,0) from dual;
                LPAD ('TEST',8,0)
                    ----------------
                 0000test
               B£º select lpad ('test',8) from dual;
              LPAD ('TEST',8)
         


Ïà¹ØÎĵµ£º

oracle±Ê¼Ç

½ñÌìÖØÐÂÕûÀíµçÄÔ£¬ÕÒµ½Ò»¸öÎļþ£¬¿´ÁËÏÂÈÕÆÚ£¨2006.11.3£© £¬Å²»Ð¡ÐÄÔÙ¶ªÁË£¬´æµ½ÍøÉÏÀ´É¹É¹¡£
SQL ÓïÑÔ·ÖÀࣺ
1  DDL£¨Êý¾Ý¶¨Òå £©ÓÃÓÚ´´½¨ºÍ¶¨ÒåÊý¾Ý¿â¶ÔÏ󣬲¢ÇÒ½«¶ÔÕâЩ¶ÔÏóµÄ¶¨Òå±£´æÔÚÊý¾Ý×ÖµäÖС£
creat  table     ´´½¨±í
alter  table     ÐÞ¸ ......

OracleÊý¾Ýµ¼Èëµ¼³öimp/expÃüÁî [ת]

OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹Ô­Ó뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
 
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´Ð ......

ORACLE PL/SQL ´æ´¢¹ý³Ì½Ì³Ì


(1)SEQNAME.NEXTVALÀïÃæµÄÖµÈçºÎ¶Á³öÀ´£¿¿ÉÒÔÖ±½ÓÔÚinsert into test values(SEQNAME.NEXTVAL) ÊÇ¿ÉÒÔÓà  ÕâÑù£º     
SELECT tmp#_seq.NEXTVAL
        INTO id_temp
        from DUAL;  È»ºó¿ÉÒ ......

java²Ù×÷oracleÊý¾Ý¿â

 package com.chinacache.boss.queryservice.service.impl;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.chinacache.boss.queryservice.excepti ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ