sql = "SELECT * FROM tb_attribute WHERE name in ({}) and is_delete = 0".format(
            ','.join(["'%s'" % item for item in names]))

 

更多推荐

python sql语句in写法