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

        XCTAssertEqual(
            sql(dbQueue, tableRequest.filter(Col.name.like("%foo"))),
            "SELECT * FROM \"readers\" WHERE \"name\" LIKE '%foo'")
    }
    
    

            "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")
    }
    
