I am using 'if condition' in my query but its not working with ISNULL
. Its given not value as well.
my query is
SELECT *,IF(posted_job_id IS NULL,0,1) as pj FROM appliedjob
id|posted_job_id|pj
1 | | 1
2 | 8 | 1
3 | 5 | 1
1 | | 1
2 | 4 | 1
It showing 1 for all not null value as well. Its ok with case I mean when I am using case.