MongoDB DBA · Question 455 · Multiple choice

30. Which of the following commands are data definition language (DDL) operations? Check all that apply:

Answer options

  1. A.
    db.createView()
  2. B.
    db.collection.remove()
  3. C.
    db.collection.dropIndex()

Answer confidence: High

Correct answer: A, C

Explanation language: Chinese

DDL 是定义/修改数据库对象结构的操作:dropIndex 删除索引、createView 创建视图都属于 DDL,所以 A、B 正确。C 的 db.collection.remove() 删除的是文档数据,属于 DML。

Papers containing this question

This question appears in 1 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗