Using below Oracle query to fetch data through oracle command parameter.
Select count(*) from tbl_name where col_name = :col_name
if i pass :col_name value as 'some value' its working and returning some count. if :col_name is null then it is not working. Because in where clause col_name = null is not correct. Instead we need to use col_name is null.
How to achieve this from c#, based on col_name value i need to use correct query.
col_name = 'some value' : Select count() from tbl_name where col_name = :col_name col_name = null : Select count() from tbl_name where col_name is null
How to achieve this in one single query. If col_name is null, need to use second where clause query, otherwise need to use first where clause query.
thanks in advance
!=. That's part of SQL, the language. If you want to compare with null you have to useIS NULLorIS NOT NULL