2016-06-23 13 views

Antwort

4

Also, das in die where Klausel aufnehmen;

select t.* 
from table t 
where question_type <> 'A' or question_type is null; 

Oder verwenden Sie die "Null-safe" gleich:

select t.* 
from table t 
where not question_type <=> 'A' ; 

ANSI SQL IS DISTINCT FROM und IS NOT DISTINCT FROM implementiert. Der Operator <=> entspricht IS NOT DISTINCT FROM.

+0

Der Null sicher gleich rock! –

1

Return ein Wert bei null und gehen Sie vor:

select * from table where COALESCE(question_type, '') <> 'A'; 
Verwandte Themen