You are welcome to repost this article. please keep this link! MongoDBshellMongoDB comes with a simple but powerful JavaScriptshell. When you type a variable in JavaScriptshell, the variable value is converted to a string and printed to the console. The following describes the basic operations and some precautions. Database CRUD operations will introduce NoSQL in the following sections
You are welcome to repost this article. please keep this link! MongoDB shell MongoDB comes with a simple but powerful JavaScript shell. If you type a variable in JavaScript shell, the value of the variable is converted to a string and printed to the console. The following describes the basic operations and some precautions. Database CRUD operations will introduce NoSQL in the following sections
You are welcome to reprint the address of this article. please keep this link ••!
MongoDB shell
MongoDB comes with a simple but powerful JavaScript shell. If you type a variable in JavaScript shell, the value of the variable is converted to a string and printed to the console.
The following describes the basic operations, Hong Kong servers, and some precautions. Database CRUD operations will introduce the path to NoSQL learning in the following sections (4): Creating, reading, updating, and deleting (CRUD)
Enter the Command Prompt (cmd.exe ). Go to the bin directory of the MongoDB decompressed Directory, that is, D: \ NoSQL \ mongodb-win32-x86_64-2.4.3 \ bin then execute mongo.exe (or mongo) to start MongoDB shell.
Shell connects to the test database by default. To use another database or website space, add a slash and database name after the server address (connect to the mongod of the local default port, but use the admin database ):
You can also choose to connect to the database, just like in SQL shell, and use "view current database terms.
Use the -- nodb option to start the shell without connecting to the database.
Tips: use ctrl + w to quickly delete the content of the row where the cursor is located ., Hong Kong server