How can I find null values with SELECT query in psycopg?
问题 I am using psycopg2 library in python and the INSERT query works good when I insert null Value with None, but when I want to do SELECT null values, with None doesn't return any. cur.execute("SELECT id FROM registro WHERE id_movil = (%s);", (None,)) This query doesnt return any rows, i dont know where is the error. Anyone know how to make SELECT query's to find null values in a DB? 回答1: First thing to do is find out what query it's turning your command into: print(cur.mogrify("SELECT id FROM