含%的字符串格式化

a = 'zengziji_sz'

sql = """

select ctype

from IO_HI.dbo.MESSAGE_QUEUE

where ctime>='20181009 08:00:00'

and receiver like '%%%s%%'

and ctype like '%%昨日%%'

group by ctype;

"""%a

你可能感兴趣的:(含%的字符串格式化)