v1.10

Document

How to Start SequoiaDB

Basic Operation

Data Model

Database Management

Aggregation

Index

Replication

Cluster

Connector

Reference

Development

Release Note

FAQ

  • Content
  • Comments
  • History

Delete

Delete means deleting records in collection. In SequoiaDB, remove() method is used to delete data.

Note:

In this document, all examples use shell interface in SequoiaDB.

remove()

The method "remove()" is used to delete records in collection. The structure of it is:

db.collectionspace.collection.remove([cond],[hint])

The method "remove()" corresponds to the statemend "DELETE" in SQL:

. [cond] corresponds to the statement containing "where" in SQL

. [hint] corresponds to the name in index table in SQL

Delete Collection Record

  • Delete all records in collection

    The following command will delete all records in collection "bar":

    db.foo.bar.remove()
  • Delete all records that match the condition in collection

    The following command will delete all records that contain the value "Tom" in the field "name".

    db.foo.bar.remove({name:"Tom"})
  • hint

    The following command will rapidly delete all records that contain the value "Tom" in the field "name" after searching them with index. The index name is "textIndex".

    db.foo.bar.remove({name:"Tom"},{"":"testIndex"})
please login to comment.
Latest Comment
  • 2015-02-14

About Us

SequoiaDB is a financial-level distributed database vendor and is the first Chinese database listed in Gartner’s Magic Quadrant OPDBMS report. SequoiaDB has recently released version 3.0.
SequoiaDB is now penetrating the vertical sector Financial Industry quickly and had more than 50 banking clients and hundreds of enterprise customers in industries including government, telecommunication, Internet and IoT.

Beijing:
Tower R, No.8 North Star East Road, Chaoyang District, Beijing,China
Guangzhou:
Tower A, No.22 Qinglan Street, Panyu District, Guangzhou,China
Shenzhen:
Tsing Hua Tech Park, Nanshan District, Shenzhen,China
Tel:400-8038-339
E-mail:contact@sequoiadb.com