Documentation

dropColumn

void public
\Bitrix\Main\DB\Connection::dropColumn(
 string $tableName,
 string $columnName
);

This non-static method deletes a column. The column must exist and must be not the part of primary constant and must be not the last one in the table.

Parameters

ParameterDescriptionVersion
$tableNameName of the table with column to be deleted.
$columnNameName of column to be deleted.

Exceptions

  • \Bitrix\Main\Db\SqlQueryException

Example



© «Bitrix24», 2001-2024
Up