Add drop index

This commit is contained in:
sunkaixuan 2023-10-28 20:22:52 +08:00
parent b2616ae0e8
commit 2718b2247b
2 changed files with 7 additions and 0 deletions

View File

@ -174,6 +174,12 @@ namespace SqlSugar
#endregion
#region DDL
public virtual bool DropIndex(string indexName)
{
indexName = this.SqlBuilder.GetNoTranslationColumnName(indexName);
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ");
return true;
}
public virtual bool DropView(string viewName)
{
viewName = this.SqlBuilder.GetNoTranslationColumnName(viewName);

View File

@ -40,6 +40,7 @@ namespace SqlSugar
bool CreateIndex(string tableName, string[] columnNames, string IndexName, bool isUnique = false);
bool DropTable(string tableName);
bool DropView(string viewName);
bool DropIndex(string indexName);
bool DropFunction(string funcName);
bool DropProc(string procName);
bool DropTable(params string[] tableName);