這幾天在寫 Store Procedure 時,總覺得怪怪的...怎麼結果不是我所想的,原來是變數的 Null 判斷寫法有問題...
IF @val = Null 跟
IF @val is Null 的寫法結果會不同喔~而且跟
SET ANSI_NULL ON / OFF (連結為msdn說明) 的設定也有關係~
附上幾個範例,這樣看起來就清楚多了吧~
【範例一】
DECLARE @val CHAR(4)
|
tsuozoe 發表在 痞客邦 留言(0) 人氣()
● 列出 SQL Server 的版本跟其所適用的安裝平台: ( 請參考
詳細版本差異比較 )
版本名稱 |
所適用安裝平台 |
Enterprise Edition (64-bit) |
Windows 2003 Server |
Enterprise Edition |
Windows NT4.0 / 2000 / 2003 Server |
Standard Edition |
Windows NT4.0 / 2000 / 2003 Server |
Workgroup Edition |
Windows NT4.0 / 2000 / 2003 Server |
Developer Edition |
Windows NT4.0 / 2000 / 2003 Server
Windows XP Professional |
Personal Edition |
Windows NT4.0 / 2000 / 2003 Server
Windows XP Professional |
Desktop Engine (MSDE) |
Windows NT4.0 / 2000 / 2003 Server
Windows XP Professional / Home |
Windows CE Edition |
Handheld PC / Pocket PC / Palm |
tsuozoe 發表在 痞客邦 留言(0) 人氣()