====== dropTableSql ====== ~~NOTOC~~ == See Also == [[v5:dictionary:executesqlarray|executeSqlArray()]] == Syntax == array dropTableSql ( string $tableName ) ===== Description ===== The method ''dropTableSql()'' creates the SQL statement necessary to drop an existing table in the database. In order to actualy drop the table, the output of the command must be executed with the [[v5:dictionary:executesqlarray|executeSqlArray()]] method. ===== Parameters ===== ==== $tableName ===== The table name must already exist in the database. ===== Usage ===== /* * create a data dictionary object, using the database connection */ $dict = NewDataDictionary($db); $tableName = "ACT"; /* * create the SQL statement necessary to drop the table and its columns and indices */ $sqlarray = $dict->dropTableSql($tableName); /* * This returns (for DB2) Array ( [0] => DROP TABLE ACT ) */ /* * This statement actually drops the table */ $dict->executeSqlArray($sqlarray);