简单描述表结构,字段类型

desc tabl_name

删除索引:alter table `db`.`table_name` drop index `index_name`  注意里面的特殊符号: `

显式索引:

show index from table_name

 

#/usr/bin/env python
#coding:utf-8

from sqlalchemy import create_engine,text
engine = create_engine("mysql+pymysql://dbname:dbpassword@ip:3306/db?charset=utf8",encoding="utf-8",echo=True)
conn = engine.connect()
# text_sql='desc table_name'
# text_sql='show index from table_name'
text_sql='alter table  `db`.`table_name` drop index `index_name`'
s=text(text_sql)
conn.execute(s)
# print conn.execute(s).fetchall()

 

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-03
  • 2021-05-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
相关资源
相似解决方案