清除特定DB的所有表

问题描述 投票:1回答:1

是否有任何查询可用于rethinkDB清除特定数据库的所有表?

我们可以通过运行.delete()逐个删除表

rethinkdb
1个回答
2
投票
r.db('DB_NAME').tableList().forEach(function(t){
  return r.db('DB_NAME').table(t).delete()
})
© www.soinside.com 2019 - 2024. All rights reserved.