Phương thức drop() trong MongoDB
Cú pháp
db.COLLECTION_NAME.drop()Ví dụ
>use mydb>show collections
mycol
mycollection
system.indexes
tutorialspoint
>Last updated
db.COLLECTION_NAME.drop()>use mydb>show collections
mycol
mycollection
system.indexes
tutorialspoint
>Last updated
>db.mycollection.drop()
true
>>show collections
mycol
system.indexes
tutorialspoint
>