I'm kind new in stored procedures, so I would appreciate some help
What I want to accomplish is to check if search criteria is null or not, and based on this criteria - to return results.
Code: Select all
select table1.*, table2.*
from some table1, table2
where table1.client = table2.id
and (table1.id = searchID or searchID = null)
can somebody suggest me other solution?