Need is or i NULL operator for where clause

Issue #187 resolved
Former user created an issue

Subj. sql operators =, in and others don't take me need results if I want to write something like

select * from tbl where col is NULL;

I can use instead op method from CompareMixin but I think explicit null check will be good solution

Comments (1)

  1. Mike Bayer repo owner

    this has always been available like the following:

        table.select(table.c.column == None)
    

    which creates an IS NULL clause.

    however, it probably wasnt documented so clearly. so in changeset:1496, changeset:1497, i added a doc for it. you can also do

       table.select(table.c.column == null())
    

    now.

  2. Log in to comment