简单描述表结构,字段类型
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()