dropColumn

@param string $table
@param string $column

@return  string
348045
public static function dropColumn($table, $column)
    {
        $query = static::getQuery();

        return static::build(
            'ALTER TABLE',
            $query->quoteName($table),
            'DROP',
            'COLUMN',
            $query->quoteName($column)
        );
    }
644147
public function getAddColumnDDL(Column $column)
    {
        $pattern = "
ALTER TABLE %s ADD %s;
";

        return sprintf($pattern,
            $this->quoteIdentifier($column->getTable()->getName()),
            $this->getColumnDDL($column)
        );
    }
920813
final public function removeColumn(Column $column): Table
    {
        if (!$this->hasColumn($column::getName())) {
            throw new InvalidArgumentException('Column '.$column::getName().' not exists');
        }

        unset($this->columns[$column::getName()]);

        return $this;
    }
1342789
protected function getDropColumnSQL($table, $name)
	{
		$sql = 'ALTER TABLE ' . $this->db->quoteName($table) . ' DROP COLUMN ' . $this->db->quoteName($name);

		return $sql;
	}
370171
protected function getDropColumnSql($table, $name)
	{
		$sql = 'ALTER TABLE ' . $this->db->quoteName($table) . ' DROP COLUMN ' . $this->db->quoteName($name);

		return $sql;
	}
399045
final public function dropTable($table = null)
    {
        $table = $this->getTable($table);

        return $this->db->dropTable($table, true)
                        ->execute();
    }
105126
public function dropColumn($columnName) {
        $this->dropColumns[] = $columnName;
        if (array_key_exists($columnName, $this->references)) {
            $this->dropReference($columnName);
        }
        return $this;
    }
772092
private void dropColumn(CmsSetupDb dbCon, String tablename, String column) throws SQLException {

        System.out.println(new Exception().getStackTrace()[0].toString());
        if (dbCon.hasTableOrColumn(tablename, column)) {
            String query = readQuery(QUERY_DROP_COLUMN);
            Map<String, String> replacer = new HashMap<String, String>();
            replacer.put(REPLACEMENT_TABLENAME, tablename);
            replacer.put(REPLACEMENT_COLUMN, column);
            dbCon.updateSqlStatement(query, replacer, null);
        } else {
            System.out.println("column " + column + " in table " + tablename + " does not exist");
        }
    }
203770
private function getColumnConstraintSQL($table, $column)
    {
        return "SELECT SysObjects.[Name]
            FROM SysObjects INNER JOIN (SELECT [Name],[ID] FROM SysObjects WHERE XType = 'U') AS Tab
            ON Tab.[ID] = Sysobjects.[Parent_Obj]
            INNER JOIN sys.default_constraints DefCons ON DefCons.[object_id] = Sysobjects.[ID]
            INNER JOIN SysColumns Col ON Col.[ColID] = DefCons.[parent_column_id] AND Col.[ID] = Tab.[ID]
            WHERE Col.[Name] = " . $this->_conn->quote($column) . ' AND Tab.[Name] = ' . $this->_conn->quote($table) . '
            ORDER BY Col.[Name]';
    }
734371
public function getRemoveColumnDDL(Column $column)
    {
        $pattern = "
ALTER TABLE %s DROP %s;
";

        return sprintf($pattern,
            $this->quoteIdentifier($column->getTable()->getName()),
            $this->quoteIdentifier($column->getName())
        );
    }
84895
public boolean dropColumn (Connection conn, String table, String column) throws SQLException
    {
        if (!tableContainsColumn(conn, table, column)) {
            return false;
        }
        executeQuery(conn, "ALTER TABLE " + tableSQL(table) + " DROP COLUMN " + columnSQL(column));
        log("Database column '" + column + "' removed from table '" + table + "'.");
        return true;
    }
1131861
public static function get_id_column(string $column, string $table): ?string
  {
    if (
      ($db = self::_get_db()) &&
      ($full_table = $db->tfn($table)) &&
      ($databases_obj = self::_get_databases())
    ){
      [$database, $table] = explode('.', $full_table);
      return $databases_obj->column_id($column, $table, $database, self::$db->host);
    }
    return false;
  }
1294133
public function dropColumn($columns)
    {
        $columns = is_array($columns) ? $columns : func_get_args();

        return $this->addCommand('dropColumn', compact('columns'));
    }
1094258
public function column($column)
    {
        $result = $this->fields($column)->one(); 

        // only return something if something is found
        if (is_array($result))
        {
            return reset($result);
        }
    }
469971
protected function addColumnAlias($column)
    {
        $tableAlias = $this->getAlias();
        if (empty($tableAlias)) {
            return $column;
        }

        if (false === strpos($column, '.') &&
            false === strpos($column, '(') &&
            false === strpos($column, 'SELECT')
        ) {
            return $tableAlias.'.'.$column;
        }

        return $column;
    }
804755
public function hasColumn ($table, $column)
		{
			$schema = $this->db->getTableSchema($table);

			return isset($schema->columns[ $column ]);
		}
595246
public function dropTable($table)
    {
        $table = $this->buildRealTableName($table);
        $sql = $this->getSchema()->getDropTableSql($table);
        $ret = $this->query($sql);
        return $ret;
    }