Delete rows with row keys matching a given prefix.

## Code sample

### C++


To learn how to install and use the client library for Bigtable, see
[Bigtable client libraries](https://docs.cloud.google.com/bigtable/docs/reference/libraries).


To authenticate to Bigtable, set up Application Default Credentials.
For more information, see

[Set up authentication for a local development environment](https://docs.cloud.google.com/docs/authentication/set-up-adc-local-dev-environment).

    namespace cbt = ::google::cloud::bigtable;
    namespace cbta = ::google::cloud::bigtable_admin;
    using ::google::cloud::Status;
    [](cbta::BigtableTableAdminClient admin, std::string const& project_id,
       std::string const& instance_id, std::string const& table_id,
       std::string const& prefix) {
      std::string table_name = cbt::TableName(project_id, instance_id, table_id);

      google::bigtable::admin::v2::DropRowRangeRequest r;
      r.set_name(table_name);
      r.set_row_key_prefix(prefix);

      Status status = admin.DropRowRange(std::move(r));
      if (!status.ok()) throw std::runtime_error(status.message());
      std::cout << "All rows starting with " << prefix
                << " successfully deleted\n";
    }

## What's next


To search and filter code samples for other Google Cloud products, see the
[Google Cloud sample browser](https://docs.cloud.google.com/docs/samples?product=bigtable).