📌  相关文章
📜  如果存在 mysql,则删除索引 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:15.646000             🧑  作者: Mango

代码示例1
create procedure DeleteIndex()
begin

IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.STATISTICS  WHERE TABLE_NAME = 'TableName'
            AND INDEX_NAME = 'IndexName' AND INDEX_SCHEMA='DbName') THEN
   ALTER TABLE  TableName DROP index THead2;
END IF;
END