All Products
Search
Document Center

Tablestore:How do I delete multiple rows of data at the same time?

Last Updated:Mar 27, 2024

After you obtain the primary key information of the data you want to delete, you can call the BatchWriteRow operation to delete the data.

Tablestore allows you to use primary key information to delete multiple rows of data. You can perform the following steps to delete multiple rows of data at the same time:

  1. Select a method to query the primary key information of the data you want to delete.

    • To delete the data whose primary key values are in the specified range, call the GetRange operation to query the data and obtain the primary key information of the data. For more information, see Read data.

    • To delete the data that meets the specified conditions, use search indexes to query the data. Then, obtain the primary key information of the data. For more information, see Create search indexes and Use search indexes by using Tablestore SDKs.

  2. Call the BatchWriteRow operation to delete multiple rows of data at the same time based on the primary key information of the rows. For more information, see Read data.