2014-05-23 30 views
-3

我需要檢查@SupplierCategory@SupplierCode條件使用,如果在SQL Server 2008的條件如何寫,如果在SQL

if (@SupplierCategory != null && @SupplierCode != null) 
    begin 
    end 
else 
    begin 
    end 

如何做到這一點不等於空...謝謝

+0

標記爲關閉爲錯字 – arserbin3

回答

2
if (@SupplierCategory is not null AND @SupplierCode is not null) 
    begin 
    end 
else 
    begin 
    end