 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to print NumberLong value in MongoDB?
The mongo shell provides the NumberLong() wrapper to handle 64-bit integers. Following is the syntax using custom variable and print using toString() −
var anyVariableName=NumberLong("yourLongNumber"); yourVariableName.toString(); To understand the above concept, let us implement the above syntax −
> var number=NumberLong("231231231231121231"); > number.toString(); This will produce the following output −
NumberLong("231231231231121231") The second example is as follows to display NumberLong −
> var anotherNumber=NumberLong("765765765765567576"); > anotherNumber.toString(); This will produce the following output −
NumberLong("765765765765567576")Advertisements
 