これらをいくつかの OR ステートメントで結合します:
SELECT *
FROM
Customer c
WHERE
example@sqldat.com
AND ( example@sqldat.com OR @CountyID IS NULL )
AND ( example@sqldat.com OR @CityID IS NULL )
これらの各パラメータについて、null の場合、チェックは基本的に無視されます。
これらをいくつかの OR ステートメントで結合します:
SELECT *
FROM
Customer c
WHERE
example@sqldat.com
AND ( example@sqldat.com OR @CountyID IS NULL )
AND ( example@sqldat.com OR @CityID IS NULL )
これらの各パラメータについて、null の場合、チェックは基本的に無視されます。