D7 API documentation
What's New
Modules
Main module in old core
Connection constructor
add
clearCaches
commitTransaction
connect
createIndex
createPrimaryIndex
disableQueryExecuting
disconnect
dropColumn
dropTable
enableQueryExecuting
executeSqlBatch
getAffectedRowsCount
getDbHost
getDbLogin
getDbName
getDisabledQueryExecutingDump
getIndexName
getNodeId
getSqlHelper
getTableField
getTableFields
getTracker
getType
getVersion
isIndexExists
isTableExists
query
queryExecute
queryScalar
renameTable
rollbackTransaction
setConnectionResourceNoDemand
setNodeId
setTracker
startTracker
startTransaction
stopTracker
truncateTable
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
Parameter | Description | Version |
---|---|---|
$tableName | Name of the table with column to be deleted. | |
$columnName | Name of column to be deleted. |
Exceptions
- \Bitrix\Main\Db\SqlQueryException
Example
© «Bitrix24», 2001-2025
Up