def drop_column ( self , tablename : str , fieldname : str ) -> int : sql = "ALTER TABLE {} DROP COLUMN {}" . format ( tablename , fieldname ) log . info ( sql ) return self . db_exec_literal ( sql )
delete a column in python db
Drops ( deletes ) a column from an existing table .
def drop_column(self, tablename: str, fieldname: str) -> int:
        """Drops (deletes) a column from an existing table."""
        sql = "ALTER TABLE {} DROP COLUMN {}".format(tablename, fieldname)
        log.info(sql)
        return self.db_exec_literal(sql)