5
I have a table NotasFiscais
and I’m searching all the records it contains in the column NChave
. But some result contains this information and others do not, in the case are as NULL
. How could I bring only 'true records'' ?
5
I have a table NotasFiscais
and I’m searching all the records it contains in the column NChave
. But some result contains this information and others do not, in the case are as NULL
. How could I bring only 'true records'' ?
10
Null is not a value, you need to use IS NULL
to find null or void IS NOT NULL
not null at the time of comparison. It should look something like:
SELECT * FROM NotasFiscais WHERE NChave IS NOT NULL
Recommended reading:
5
Null is a result that does not return any value so it cannot be compared by operators as = or != ,
for this you must use IS NULL
to find NULL and IS NOT NULL
to find values that are not NULL.
SELECT * FROM table WHERE field IS NOT NULL
Browser other questions tagged sql
You are not signed in. Login or sign up in order to post.
Got it, thanks for the guidance. And your statement met my need.
– Igor Carreiro
@Igorcarreiro do not forget to mark this answer as your problem solver.
– Marco