i am facing an issue in python where i am using a query and i am passing some params in it:
query = select * from %s where xyz like 'abc%'
query %(tablename)
here it gives me an error. Can anyone help in this
It looks like python is interpreting the % as a printf-like format character. Try using %%?
query = select * from %s where xyz like 'abc%%'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.