Home  >  Q&A  >  body text

mysql - Python创建相同结构的多个数据库表,表名是循环添加的。

tabname是数据库表的名称,通过字符串连接,老是出错。

高洛峰高洛峰2741 days ago395

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 10:36:48

    SQL syntax error
    I guess there is one more dot
    sql = '''CREATE TABLE ''' + tabname+''''
    Note that the last one is four dots

    reply
    0
  • Cancelreply