Demonstrates how to delete a table.
485142
public void deleteTable() {
    // [START bigtable_delete_table]
    // Deletes the entire table.
    System.out.println("\nDelete table: " + tableId);
    try {
      adminClient.deleteTable(tableId);
      System.out.printf("Table: %s deleted successfully%n", tableId);
    } catch (NotFoundException e) {
      System.err.println("Failed to delete a non-existent table: " + e.getMessage());
    }
    // [END bigtable_delete_table]
  }
637081
def truncate_table(self, tablename):
        
        self.get(tablename).remove()
        self.db.commit()
814280
private void deleteTable(String datasetId, String tableId)
      throws IOException, InterruptedException {
    executeWithBackOff(
        client.tables().delete(projectId, datasetId, tableId),
        String.format(
            "Error when trying to delete the temporary table %s in dataset %s of project %s. "
            + "Manual deletion may be required.",
            tableId, datasetId, projectId));
  }
74585
public boolean deleteTable(String datasetName, String tableName) {
    // [START ]
    boolean deleted = bigquery.delete(datasetName, tableName);
    if (deleted) {
      // the table was deleted
    } else {
      // the table was not found
    }
    // [END ]
    return deleted;
  }
22039
def delete(self, bucket=None, ignore=False):
        

        # Make lists
        buckets = bucket
        if isinstance(bucket, six.string_types):
            buckets = [bucket]
        elif bucket is None:
            buckets = reversed(self.buckets)

        # Iterate
        tables = []
        for bucket in buckets:

            # Check existent
            if bucket not in self.buckets:
                if not ignore:
                    message = 'Bucket "%s" doesn\'t exist.' % bucket
                    raise tableschema.exceptions.StorageError(message)
                return

            # Remove from buckets
            if bucket in self.__descriptors:
                del self.__descriptors[bucket]

            # Add table to tables
            table = self.__get_table(bucket)
            tables.append(table)

        # Drop tables, update metadata
        self.__metadata.drop_all(tables=tables)
        self.__metadata.clear()
        self.__reflect()
1273428
def delete(self, table_name):
        
        dataset = Dataset(self, table_name)
        deleted = dataset.delete()
        if deleted:
            return deleted

        raise CartoException('''The table `{}` doesn't exist'''.format(table_name))
1192376
def delete(self):
    
    try:
      self._api.table_delete(self._name_parts)
    except google.datalab.utils.RequestException:
      # TODO(gram): May want to check the error reasons here and if it is not
      # because the file didn't exist, return an error.
      pass
    except Exception as e:
      raise e
    return not self.exists()
951599
def delete(self):
        
        table_client = self._instance._client.table_admin_client
        table_client.delete_table(name=self.name)
646437
def wipe_table(self, table: str) -> int:
        """"""
        sql = "DELETE FROM " + self.delimit(table)
        return self.db_exec(sql)
926515
def do_drop(self, line):
        ""
        self.conn.delete_table(self.conn.get_table(line))
283455
public function destroy()
    {
        // delete DB
        $sql = sprintf(
            'DROP TABLE `%s`;',
            $this->mysql->quote($this->section)
        );

        if (false === $this->mysql->exec($sql)) {

            $this->throwException(
                'Unable to delete the database: ',
                $this->mysql->errorInfo()
            );
        }

        $this->registry[$this->section] = array();
    }
1235203
public void cleanTables() {
        try {
            DefaultTableModel algModel = (DefaultTableModel) jTableAlgoritms.getModel();
            DefaultTableModel strModel = (DefaultTableModel) jTableStreams.getModel();
            int rows = jTableAlgoritms.getRowCount();
            int srow = jTableStreams.getRowCount();
            for (int i = 0; i < rows; i++) {
                algModel.removeRow(0);
            }
            for (int i = 0; i < srow; i++) {
                strModel.removeRow(0);
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Error cleaning the table.");
        }
    }
1295951
function Delete(Table $table, Condition $condition = null, OrderList $orderList = null, $offset = 0, $count = 0)
    {
        return parent::CreateDelete($table, $condition, $orderList, $offset, $count);
    }
574222
function del() {
    // Make sure tableName is processed by the formatter first.
    var tableName = this.tableName;
    var wheres = this.where();
    var sql = 'delete from ' + tableName + (wheres ? ' ' + wheres : '');
    var returning = this.single.returning;
    return {
     sql: sql + this._returning(returning),
     returning: returning
   };
  }
382287
public static function remove()
    {
        // load session config
        \Config::load('session', true);

        // prompt the user to confirm they want to remove the table.
        $iamsure = \Cli::prompt('Are you sure you want to delete the sessions table?', array('y','n'));

        // if they are sure, then let's drop it
        if ($iamsure === 'y')
        {
            \DBUtil::drop_table(\Config::get('session.db.table'));
            return \Cli::color('Session database table deleted.', 'green');
        }

        // if we made it to here, than that means the user said no.
        return \Cli::color('Session database table was not deleted.', 'red');
    }
1304177
def delete(self, table):
        
        self._table = table
        self._limit = None
        self._query = "DELETE FROM {0}".format(self._table)

        return self
1264942
def tabledelete(tablename, checksubtables=False, ack=True):
    
    tabname = _remove_prefix(tablename)
    t = table(tabname, ack=False)
    if t.ismultiused(checksubtables):
        six.print_('Table', tabname, 'cannot be deleted; it is still in use')
    else:
        t = 0
        table(tabname, readonly=False, _delete=True, ack=False)
        if ack:
            six.print_('Table', tabname, 'has been deleted')