これを試すことができますか:deleted_1 is not null and deleted_1 != '1'
?
mysql> select 0 is not null and 0 != '1', 1 is not null and 1 != '1', null is not null and null != '1';
+----------------------------+----------------------------+----------------------------------+
| 0 is not null and 0 != '1' | 1 is not null and 1 != '1' | null is not null and null != '1' |
+----------------------------+----------------------------+----------------------------------+
| 1 | 0 | 0 |
+----------------------------+----------------------------+----------------------------------+
またはこのdeleted_1 is null or deleted_1 != '1'
:
mysql> select 0 is null or 0 != '1', 1 is null or 1 != '1', null is null or null != '1';
+-----------------------+-----------------------+-----------------------------+
| 0 is null or 0 != '1' | 1 is null or 1 != '1' | null is null or null != '1' |
+-----------------------+-----------------------+-----------------------------+
| 1 | 0 | 1 |
+-----------------------+-----------------------+-----------------------------+
それは本当にあなたが戻って取得したいかに依存します。
を使用することをお勧めしますか? –
'WHERE \' deleted_1 \ '!= 'NULL''あなたはこれをしてはいけません。 NULLは特別です、私の答えを見てください。 – TimWolla
@TimWollaありがとう、私はあなたのやり方をします。非常に不明確な質問については – Linas