/// <summary>
/// 重命名列名
/// </summary>
/// <param name="tableName">表名</param>
/// <param name="orignColName">原列名</param>
/// <param name="newColName">新列名</param>
/// <returns>重命名列名的SQL语句</returns>
public string ModifyColumnName(string tableName, string orignColName, string newColName)
{
//ALTER TABLE TABLE_NAME RENAME COLUMN COLUMN_OLD_NAME TO COLUMN_NEW_NAME;
return "ALTER TABLE " +tableName+" RENAME COLUMN "+orignColName+" TO "+newColName;
}
/// <summary>
/// 表中添加列
/// </summary>
/// <param name="tableName">表名</param>
/// <param name="colType">数据类型</param>
/// <param name="column_nam
C# SQL语句 新增 列 修改类型 /重命名列名 删除
最新推荐文章于 2023-11-29 08:32:08 发布