Parameter in Where clause may be Null or has Value

SELECT Person_Name
  FROM tblPersons
 WHERE AREA_CODE = pAreaCode
   AND (pRationCardNo IS NULL OR RATION_ID = pRationCardNo)

Comments are closed.