- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
[¤À¨É] SqlServerCentral¨C¤é¤@ÃD¤¤¤å¾ã²z
¥»©«³Ì«á¥Ñ kimbal ©ó 2010-8-30 23:57 ½s¿è
T-SQL ½g
2010-08-04 null »P coalesce
isnull, coalese ªº¤p¤À§O- DECLARE @STR VARCHAR(3)
- SET @STR=NULL
- SELECT ISNULL(@STR,'GIVEN STRING IS NULL')
- SELECT COALESCE(@STR,'GIVEN STRING IS NULL')
½Æ»s¥N½X select¥X¨Ó«áµ²ªG¬O 'GIV' ©M 'GIVEN STRING IS NULL'
ISNULL·|¥ý¬d¬Ý@STRÃþ«¬. ¦ýCOALESE ´N¤£·|
2010-08-30 '' »P 0- create table #temp(id INT, code nvarchar(2))
- insert into #tempselect 1, '0' UNION
- select 2, '1' UNION
- select 3, '0' UNION
- select 4,'22' UNION
- select 5,'0'
- update #temp set code = '' where code = '0'
- select * from #temp where code = 0
- drop table #temp
½Æ»s¥N½X ³Ì«á¦^¶Ç3¦æ
'' = 0 |
|