Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
The SQL Server Native Client OLE DB provider exposes the ITableDefinition::AddColumn function. This allows consumers to add a column to a SQL Server table.
When you add a column to a SQL Server table, the SQL Server Native Client OLE DB provider consumer is constrained as follows:
If DBPROP_COL_AUTOINCREMENT is VARIANT_TRUE, DBPROP_COL_NULLABLE must be VARIANT_FALSE.
If the column is defined by using the SQL Server timestamp data type, DBPROP_COL_NULLABLE must be VARIANT_FALSE.
For any other column definition, DBPROP_COL_NULLABLE must be VARIANT_TRUE.
Consumers specify the table name as a Unicode character string in the pwszName member of the uName union in the pTableID parameter. The eKind member of pTableID must be DBKIND_NAME.
The new column name is specified as a Unicode character string in the pwszName member of the uName union in the dbcid member of the DBCOLUMNDESC parameter pColumnDesc. The eKind member must be DBKIND_NAME.