Zoomed Image

AMSX Scripting Language - Command : addcolumnstotable

Summary

Add one or more columns to a table if they do not already exist

Description

Adds columns to an existing table, silently skipping any that already exist. Each column can be specified with a full SQL type definition, or just a name to use the default type of nvarchar(255) null. You can also pass a single CSV list of column names in argument 0 to add multiple columns with the default type.

Parameters

ParameterDescription
cmdTable name to add columns to
Argument 0Column definition in the form "ColumnName nvarchar(255) null", or a CSV list of column names; additional columns can be passed in arguments 1, 2, etc.

Syntax


AddColumnsToTable "Table name to add columns to", "Column definition in the form "ColumnName nvarchar(255) null", or a CSV list of column names; additional columns can be passed in arguments 1, 2, etc."

Return to the AMSX Command Reference