0
以下查詢的實際結果是NULL工作NULLIF()函數不與WHERE子句
select semid from programvariantterm where programvariantid = 240
但是當我嘗試下面的語句,它給0行:
declare @semid int
set @semid = -1
select semid from programvariantterm
where programvariantid = 240 and semid = nullif(@semid,-1)