我知道必须使用is null
,以及null!=null
。
但是考虑这么个函数
def find(name=None, id=None):
cursor.execute("select * from t_name where name=%s, id=%s", (name, id))
像这样参数化的场景中,难道我要为每个可能为 null
的值重写一句带is
的 sql?
我知道必须使用is null
,以及null!=null
。
但是考虑这么个函数
def find(name=None, id=None):
cursor.execute("select * from t_name where name=%s, id=%s", (name, id))
像这样参数化的场景中,难道我要为每个可能为 null
的值重写一句带is
的 sql?