How can i write an sql query to only return rows from a table
where for example column A is not null AND columb B is not 0
the way i am writing it is:
where A is not null AND B !=0
but the problem is that the query result is also eliminating rows where only one of the conditions is true such as column a being null but column b being anything but 0 & vice versa
I need the query to only eliminate (not return) the rows where BOTH conditions of my where clause are met.
I only want the result i get from query to be rows from the table where column A is not NUll and column B IS NOT = 0 but i need BOTH conditions to be met not just one of them
Someone posted this Answer on here but then they deleted it (not sure why?) but their answer worked and it was.
i tried using
and
but the where clause would be triggered even if only 1 of the conditions was met and I needed it to be triggered only when both conditions where met.
So again, the answer to my questions was using the below code.
Thanks!