全部产品
Search
文档中心

表格存储:删除二级索引

更新时间:Sep 20, 2026

使用 Node.js SDK 删除指定数据表中的全局二级索引或本地二级索引,不影响数据表及表中数据。

前提条件

注意事项

二级索引删除后不可恢复,如需再次使用请重新创建二级索引。

参数

参数

说明

mainTableName

数据表名称。

indexName

索引表名称。

示例

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

client.dropIndex({
  mainTableName: "<TABLE_NAME>", //设置数据表名称。
  indexName: "<INDEX_NAME>" //设置索引表名称。
}, function (err, data) {
  if (err) {
    console.log('error:', err);
    return;
  }
  console.log('success:', JSON.stringify(data, null, 2));
});