I want to write a query that returns all rows when a given parameter in a where
condition is null but when the parameter is not null return rows that match the condition, i am using postgres 9.6
and here is what i have so far but no dice...
Edit
let me clarify the question
i have a prepared statement like this
select * from students where first_name like $1
what i want to do is when $1 is null
ignore the where
and return all students
Thanks