rename columnrename column

更改现有表列的名称。Changes the name of an existing table column. 若要更改多个列的名称,请参阅以下内容To change the name of multiple columns, see below.

语法Syntax

.rename column [DatabaseName .] TableName . ColumnExistingName to ColumnNewName.rename column [DatabaseName .] TableName . ColumnExistingName to ColumnNewName

其中 DatabaseName、TableName、ColumnExistingName 和 ColumnNewName 是相应实体的名称,并遵循标识符命名规则Where DatabaseName, TableName, ColumnExistingName, and ColumnNewName are the names of the respective entities and follow the identifier naming rules.

重命名列rename columns

更改同一个表中的多个现有列的名称。Changes the names of multiple existing columns in the same table.

语法Syntax

.rename columns Col1 = [DatabaseName . [TableName . Col2]] , ....rename columns Col1 = [DatabaseName . [TableName . Col2]] , ...

该命令可用于交换两列的名称(每列均重命名为另一列的名称。)The command can be used to swap the names of two columns (each is renamed as the other's name.)