array dropColumnSql( string $tableName, string $columnName )
The method dropColumnSql()
creates the SQL statement necessary to drop an existing column given by $columnName
from an existing table, given by ''$tableName'.
In order to actually create the column, the returned array must be passed to the executeSqlArray() method.
/* * Connection to DB2 database */ $dict = NewDataDictionary($db); $sqlarray = $dict->dropColumnSql('ACT','ACTNOTES'); print_r($sqlarray); /* * Prints Array ( [0] => ALTER TABLE ACT DROP COLUMN ACTNOTES ) */ $dict->executeSqlArray($executeSqlArray);