Delete a secondary index

更新时间: 2026-01-14 11:05:48

If you no longer need a secondary index that is created for a data table, you can call the DeleteIndex operation to delete the secondary index.

Prerequisites

Usage notes

Deleted secondary indexes cannot be restored. If you need to use the secondary index after you delete it, you need to create the secondary index again.

Parameters

Parameter

Description

mainTableName

The name of the data table.

indexName

The name of the index table.

Examples

var client = require('./client');

client.dropIndex({
  mainTableName: "<TABLE_NAME>", // Specify the name of the data table. 
  indexName: "<INDEX_NAME>" // Specify the name of the index table. 
}, function (err, data) {
  if (err) {
    console.log('error:', err);
    return;
  }
  console.log('success:', JSON.stringify(data, null, 2));
});
上一篇: Use a secondary index to read data 下一篇: SQL query
阿里云首页 表格存储 相关技术圈