),)) ) as begin ) --如果@nameA 不为空则直接返回@nameA IF @nameA <>'' BEGIN set @lastNameVal = @nameA END ELSE --否则如果@nameA是空则返回nameB,经测试兼容null和'' begin set @lastNameVal = @nameB end return @lastNameVal end
2024-03-13 08:21:33
),)) ) as begin ) --如果@nameA 不为空则直接返回@nameA IF @nameA <>'' BEGIN set @lastNameVal = @nameA END ELSE --否则如果@nameA是空则返回nameB,经测试兼容null和'' begin set @lastNameVal = @nameB end return @lastNameVal end