¹ØÓÚoracleÖÐʹÓÃnvlº¯Êýʱ£¬¶Ô¿Õ×Ö·û´®µÄÀí½â
×òÌìϰà֮ǰÔÚ³ÌÐòÖÐÓöµ½ÁËÒ»¸öʹÓÃnvlµÄsqlÓï¾ä£¬ÏàÐÅÕâ¸öº¯Êý´ó¼Ò¶¼Ó¦¸ÃʹÓùý£¬²¢ÇÒÓ¦¸ÃÊǺܼòµ¥µÄ¡£
ÒòΪ֮ǰ×öµÄÊý¾Ý¿âÒÆÖ²Ê±Óöµ½¹ýÕâ¸öÎÊÌ⣬ËùÒÔ½ñÌìÄÃÀ´ÔÚÕâÀï¼ÇÔØÒ»Ï¡£
ÆäÖÐÓÐÒ»¶ÎwhereÌõ¼þÊÇÕâÑùµÄ£º
and ((nvl('', ' ') <> ' ' and a.benifitvchno like '%%') or
(nvl('', ' ') = ' ' and a.benifitvchno like '%'))
ÒÔÉÏÊÇÔÚplsqlÖдò³öµÄ£¬»ù±¾ÉϵÄÒâ˼¾ÍÊÇÈç¹ûa.benifitvchnoÊÇ¿ÕÖµµÄ»°£¬ÏÂÃæµÄÌõ¼þ»á³ÉÁ¢£¬
Èç¹ûÓÐÖµµÄ»°ÉÏÃæµÄÓï¾ä»á³ÉÁ¢¡£Êµ¼ÊÉÏÔÚnvlºóÃæµÄ‘’ÖÐÓ¦¸ÃÊÇÄǸöa.benifitvchnoµÄÖµ£¬ÒòΪÔÚÕâÀïÊǿգ¬ËùÒÔÏÔʾΪ‘’¡£
ÕâÀïÒª×ÅÖØËµÃ÷µÄÊÇoracle¶ÔÓÚ‘’µÄ´¦ÀíĬÈÏÊÇnullµÄ£¬¶ø‘ ’²ÅÊÇ¿Õ×Ö·û´®£¬£¨Ç°ÃæÊÇ‘’£¬ºóÃæÊÇ‘ ’£¬ÕâÀïÇø±ðÊǺóÕßÖмäÓпոñ£©£¬ËùÒÔ¾ÍÊÇÕâÀïÊÇÓÐÇø±ðµÄ£¬Òò´ËÈç¹û½«ÉÏÃæÓï¾äдΪ¶¼ÊÇûÓпոñµÄ‘’£¬½á¹û¿Ï¶¨ÊDz»¶ÔµÄ¡£
²¹³ä£º½ñÌìÔÚcsdnÉÏÎÊÁËÏ£¬
¿ÉÒÔʹÓÃÒÔÏÂÓï¾äʵÑ飺
(1)
select
1
from
dual
where
nvl(
''
,
''
)
=
''
(2)select
1 from
dual where
nvl('', '') is null
ÒÔÉÏÁ½¾äÖеÚÒ»¾ä²»»áÓÐÖµ£¬µÚ¶þ¾ä²Å»áÓÐÖµ¡£
ÕýÏñ
wh62592855
ÅóÓÑ˵µÄ£ºnull=null£¬·µ»ØÓ¦¸ÃÊÇFALSE¡£Ö»Òª¼ÇסNULL²»µÈÓÚÈκÎÖµ¾ÍÊÇÁË£¬Ò²²»µÈÓÚNULL¡£
ÌØ´Ë·Ç³£¸Ðл
wildwave£¬
wh62592855
Á½Î»ÅóÓѵĽâ´ð¡£
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
oracleÊý¾Ý¿âͬ²½¼¼Êõ
¸ß¼¶¸´ÖÆ
ʲôÊǸ´ÖÆ£¿¼òµ¥µØËµ¸´ÖƾÍÊÇÔÚÓÉÁ½¸ö»òÕß¶à¸öÊý¾Ý¿âϵͳ¹¹³ÉµÄÒ»¸ö·Ö²¼Ê½Êý¾Ý¿â»·¾³Öп½±´Êý¾ÝµÄ¹ý³Ì¡£
¸ß¼¶¸´ÖÆ£¬ÊÇÔÚ×é³É·Ö²¼Ê½Êý¾Ý¿âϵͳµÄ¶à¸öÊý¾Ý¿âÖи´ÖƺÍά»¤Êý¾Ý¿â¶ÔÏóµÄ¹ý³Ì¡£ Oracle ¸ß¼¶¸´ÖÆÔÊÐíÓ¦ÓóÌÐò¸üÐÂÊý¾Ý¿âµÄÈκθ±±¾ ......
Name:JDBC-DEV1
JNDI Name:jdbc.datasource.DS1
AdminServer
Row Prefetch Size: 48
Stream Chunk Size:256
URL:jdbc:oracle:thin:@192.168.0.118:1521:AAT
Driver Class Name:oracle.jdbc.OracleDriver
Á¬½Óoracle¼°postgresqlµÄÁ¬½Ó×Ö·û´®
package com.lwf.eus.util;
import java.sql.Conn ......
֮ǰ¶ÔORACLEÖеıäÁ¿Ò»Ö±Ã»¸öÌ«Çå³þµÄÈÏʶ£¬±ÈÈç˵ʹÓ㺡¢&¡¢&&¡¢DEIFINE¡¢VARIABLE……µÈµÈ¡£½ñÌìÕýºÃÏÐÏÂÀ´£¬ÉÏÍøËÑÁËËÑÏà¹ØµÄÎÄÕ£¬»ã×ÜÁËһϣ¬ÌùÔÚÕâÀ·½±ãѧϰ¡£
==================================================================================
ÔÚoracle ÖУ¬¶ÔÓÚÒ»¸öÌá½ ......
oracle ´æ´¢¹ý³ÌµÄ»ù±¾Óï·¨ ¼°×¢ÒâÊÂÏî
oracle ´æ´¢¹ý³ÌµÄ»ù±¾Óï·¨
1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
²ÎÊý1 IN NUMBER,
²ÎÊý2 IN NUMBER
) IS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
2.SELECT INTO STATEMENT
½«selec ......