I am passing where clause parameter values from a program however when I am sending at least one one value I get the result however if I am sending all parameters as null no output is coming, i want a query such that if all parameters are sent as null will display all the records in the database
following is the query which retrieves values if one condition is satisfied
SELECT *
FROM STUDENT
LEFT JOIN COURSE
ON STUDENT.COURSE_ID = COURSE.COURSE_ID
WHERE STUDENT.STD_ID = null
OR STUDENT.STD_NAME = null
OR STUDENT.STD_START_DATE = null
OR STUDENT.STD_END_DATE = null
OR STUDENT.STD_GENDER = null
OR STUDENT.COURSE_ID = null;
STD_START_DATE =nulldoes not work you need to useSTD_START_DATE IS null