             "SELECT * FROM \"readers\" WHERE \"age\" <> \"age\"")
         
         XCTAssertEqual(
+            sql(dbQueue, tableRequest.filter(!(Col.age == nil))),
+            "SELECT * FROM \"readers\" WHERE \"age\" IS NOT NULL")
+        XCTAssertEqual(
+            sql(dbQueue, tableRequest.filter(!(Col.age == DatabaseValue.null))),
+            "SELECT * FROM \"readers\" WHERE \"age\" IS NOT NULL")
+        XCTAssertEqual(
+            sql(dbQueue, tableRequest.filter(!(nil == Col.age))),
+            "SELECT * FROM \"readers\" WHERE \"age\" IS NOT NULL")
+        XCTAssertEqual(
+            sql(dbQueue, tableRequest.filter(!(DatabaseValue.null == Col.age))),
+            "SELECT * FROM \"readers\" WHERE \"age\" IS NOT NULL")
+        XCTAssertEqual(
+            sql(dbQueue, tableRequest.filter(!(Col.age == Col.age))),
+            "SELECT * FROM \"readers\" WHERE \"age\" <> \"age\"")
+
+        XCTAssertEqual(
             sql(dbQueue, tableRequest.filter(Col.name != "B")),
             "SELECT * FROM \"readers\" WHERE \"name\" <> 'B'")
         XCTAssertEqual(

            "SELECT * FROM \"readers\" WHERE \"age\" <> \"age\"")
        
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(Col.age != nil)),
            "SELECT * FROM \"readers\" WHERE \"age\" IS NOT NULL")
        XCTAssertEqual(

            "SELECT * FROM \"readers\" WHERE 0")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(true != false)),
            "SELECT * FROM \"readers\" WHERE 1")
        
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(Col.age == true))),
            "SELECT * FROM \"readers\" WHERE \"age\" <> 1")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(true == Col.age))),
            "SELECT * FROM \"readers\" WHERE \"age\" <> 1")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(Col.age == false))),
            "SELECT * FROM \"readers\" WHERE \"age\" <> 0")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(false == Col.age))),
            "SELECT * FROM \"readers\" WHERE \"age\" <> 0")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(true == true))),
            "SELECT * FROM \"readers\" WHERE 0")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(false == false))),
            "SELECT * FROM \"readers\" WHERE 0")
        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(!(true == false))),
            "SELECT * FROM \"readers\" WHERE 1")
    }
    
