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

mssql null µÄÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

select case null
when '' then '1' 
when null then '2' --ΪʲôûÓÐÔÚÕâ¸öλÖÃÅжϳöÀ´
else '3' 
end a 

select 1 a,2 b into #a
select isnull(b,0) b from #a where a=2
--bÁÐûÓÐÊý¾Ý Ó¦¸ÃÓÃʲôÀ´ÅжÏbÊÇ¿ÕµÄÄØ


--bÁÐûÓÐÊý¾Ý Ó¦¸ÃÓÃʲôÀ´ÅжÏbÊÇ¿ÕµÄÄØ
where b is null

NULL Óë NULL ±ÈĬÈÏÊÇUNKWONEµÄ,

µÚ¶þ¸ö²»ÊǺÜÃ÷°×.
"ûÓÐÖµ"ºÍ"ÓÐÖµµ«ÊÇֵΪNULL"ÊÇ2¸ö¸ÅÄî,¿ÉÒÔ¼Û¸ñÅжÏ,Èç¹û·µ»Ø0ÐмǼ,ÔòÉèÖÃbΪ0
SQL code:

DECLARE @b INT
SELECT @b = ISNULL(b,0) from #a WHERE a=2
IF @@ROWCOUNT = 0
SELECT @b = 0
SELECT @b AS b



1¡¢
 null is null nul <> null
2¡¢¿Õ¼¯ºÏûÓÐÊôÐÔ

isnull(b,0)µÄÒâ˼¾ÍÊÇbûÓÐÊý¾ÝµÄʱºò·µ»á0Âï

·¹ý ²ä·Ö °ï¶¥ ѧϰ

ÒýÓÃ
NULL Óë NULL ±ÈĬÈÏÊÇUNKWONEµÄ,

Ö§³Ö£¬
²¹³ä£º
ÁíÍânullÓëÈκηÇnull±È
ĬÈÏÊÇUNKWONEµÄ


Ïà¹ØÎÊ´ð£º

sqlÓï¾ä¶à±í¶à×ֶβéѯ - MS-SQL Server / »ù´¡Àà

ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд 

ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......

jspÁ´½Ósql2000µÄÒÉÎÊ£¿



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

MS SQL×÷ÒµÎÊÌâ - MS-SQL Server / Ó¦ÓÃʵÀý

ÈçºÎÔÚSQL2005ÖÐÉ趨¶¨Ê±×÷Òµ£¬±ÈÈç˵¶¨Ê±ÇåÀíijЩ±íµÄÊý¾Ý£¬
»òÕßÊǶ¨Ê±µÄ½«Ä³Ð©±íµÄÊý¾Ýµ¼³öexcel£¡
ÔÚÏߵȴý£¬¼±¼±¼±£¬×îºÃÊÇÏêϸ²½Ö裡
֮ǰÎÒ×öµÄ×÷ÒµÓеãÎÊÌ⣡
°ïUP

²Î¿¼:http://hi.baidu.com/toiota ......

Çë½ÌSQLSERVERµÄÁ½¸öÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

1¡£ÔõÑùʹxp_cmdshellÄÜÍêÕûÊä³ö³¬¹ý255¸ö×Ö·ûµÄ×Ö·û´®¡£
2¡£select ʱ£¬¼ìË÷ËÙ¶ÈÊÇÓëfromºóµÄ TABLE˳ÐòÓйأ¬»¹ÊÇÓëwhereÌõ¼þµÄ˳ÐòÓйØ(TABLEÊý¾Ý¶àÉÙ )
ÔÚϵͳÊôÐÔÉ趨ÀïÓиöÑ¡Ïî,¿ÉÒÔÐ޸ĵ¥×Ö¶ÎÊä³ö×ÖÊýÏÞÖÆ. ......

mysqlÇøû¸ßÊÖ - MS-SQL Server / »ù´¡Àà

ÎÒ¾õµÃmysqlºÍsqlserverÓй²Í¬µÄµØ·½£º
ÓиöÎÊÌâÊǹØÓÚ±íµÄËøÎÊÌ⣺
½ø³ÌA ½ø³ÌB
select * from user where id in lock share mode£¨¹²ÏíËø)
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ