Remove a column to an existing table.
15082
def drop_column(self, table, name):
        """"""
        try:
            self.execute('ALTER TABLE {0} DROP COLUMN {1}'.format(wrap(table), name))
            self._printer('\tDropped column {0} from {1}'.format(name, table))
        except ProgrammingError:
            self._printer("\tCan't DROP '{0}'; check that column/key exists in '{1}'".format(name, table))
        return name
770294
def delete_table(self, tablename):
        
        self.tables = filter(lambda x: x.name != tablename, self.tables)
864880
def drop_columns(self, col):
        
        try:
            self.cleaned_data.drop(col, axis=1, inplace=True)
        except Exception as e:
            raise e
686737
private void removeColumn(int index)
    {
        TableColumn column = tableColumns.get(index);
        column.removePropertyChangeListener(widthListener);
        tableColumns.remove(index);
        JComponent component = customComponents.remove(index);
        remove(component);
        if (componentRemover != null)
        {
            componentRemover.accept(index);
        }
    }
442609
public static function deleteColumn(string $tableName, string $column)
    {
        if(Schema::hasTable($tableName)) {
            Schema::table(
                $tableName, function ($table) use ($tableName, $column) {
                    if(Schema::hasColumn($tableName, $column)) {
                        $table->dropColumn($column);
                    }
                }
            );
        }
    }
1094114
def drop_column(self, name):
        
        self._check_dropped()
        if name in list(self.table.columns.keys()):
            self.op.drop_column(self.table.name, name, schema=self.schema)
            self.table = self._update_table(self.table.name)
937356
def rename_column(old, nu)
      col = @origin.columns[old.to_s]

      definition = col[:type]
      definition += ' NOT NULL' unless col[:is_nullable]
      definition += " DEFAULT #{@connection.quote(col[:column_default])}" if col[:column_default]

      ddl('alter table `%s` change column `%s` `%s` %s' % [@name, old, nu, definition])
      @renames[old.to_s] = nu.to_s
    end
846393
def make_delete_table(table: Table, delete_prefix='delete_from__') -> Table:
    """"""

    name = delete_prefix + table.name
    primary_key = table.primary_key
    key_names = set(primary_key.column_names)
    columns = [column for column in table.columns if column.name in key_names]
    table = Table(name, columns, primary_key)

    return table
1199387
def remove(self, field: Field):
        
        self._table = [fld for fld in self._table if fld is not field]
1345186
def clear(self):
        
        model = self.tree.model()
        # Don't use model.clear(). it will delete the column sizes
        model.removeRows(0, 1)
        model.setRowCount(1)
        self._setColumnCountForContents()
1013750
public function removeColumn($column)
    {
        foreach ($this->getCellList() as $coord) {
            sscanf($coord, '%[A-Z]%d', $c, $r);
            if ($c == $column) {
                $this->deleteCacheData($coord);
            }
        }
    }
321132
def delete(self, table, where=None):
        """"""
        if where:
            where_key, where_val = where
            query = "DELETE FROM {0} WHERE {1}='{2}'".format(wrap(table), where_key, where_val)
        else:
            query = 'DELETE FROM {0}'.format(wrap(table))
        self.execute(query)
        return True
1026512
def delete(self, row):
        """"""
        i = self._get_key_index(row)
        del self.keys[i]
115869
def clear(self):
        """"""
        with self._connection as con:
            con.execute("DELETE FROM {};".format(self.table))
541955
function removeColumnByKey(opts: Options, change: Change, key: string): Change {
    const { value } = change;

    const pos = TablePosition.create(opts, value.document, key);
    const { table } = pos;

    const colIndex = pos.getColumnIndex();

    const rows = table.nodes;

    // Remove the cell from every row
    if (pos.getWidth() > 1) {
        rows.forEach(row => {
            const cell = row.nodes.get(colIndex);
            change.removeNodeByKey(cell.key, { normalize: false });
        });
    } else {
        // If last column, clear text in cells instead
        rows.forEach(row => {
            row.nodes.forEach(cell => {
                cell.nodes.forEach(node => clearCell(opts, change, cell));
            });
        });
    }

    // Replace the table
    return change;
}
251904
public Table replaceColumn(final String columnName, final Column<?> newColumn) {
        int colIndex = columnIndex(columnName);
        return replaceColumn(colIndex, newColumn);
    }
19721
def drop_column(self, *columns):
        
        columns = list(columns)

        return self._add_command("drop_column", columns=columns)