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
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
本文标题:含%的字符串格式化
本文链接:https://www.haomeiwen.com/subject/yxlpaftx.html
网友评论