Syntax:
Db.collection-Name.drop();
Example:
>use mydb
switched to db mydb
>show collections
mycol
mycollection
>
|
Now drop collection by name,
>db.mycollection.drop()
true
>
|
Again check the list
>show collections
mycol
>
|
See the above result, mycollection is
missing...
No comments:
Post a Comment
Please do not enter any spam link in the comment box.