我将如何在以下内容中转义 %:
cursor.execute('''SELECT MIN(id) FROM title WHERE provider=%s
AND vendor_id LIKE "%s%"''', (provider, vendor_id_stem))
cursor.execute("SELECT MIN(id) FROM title WHERE provider=%s"
"AND vendor_id LIKE '%s%%'", (provider, vendor_id_stem))
将其添加为 python 变量:
cursor.execute("SELECT MIN(id) FROM title WHERE provider=%s AND
vendor_id LIKE %s", (provider, vendor_id_stem + '%'))