Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3442308
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:39:09+00:00 2026-05-18T08:39:09+00:00

I need to know how to use where in MongoDB queries using Java Driver.

  • 0

I need to know how to use where in MongoDB queries using Java Driver.

SELECT COLUMN1, COLUMN2 WHERE COLOUM3 = 'KeyWord';

I have a key Name and its value, and i want to find some other key/value. I think i can use $where for that. But, i dont know its syntax in java.

How shall i use where in my mongo queries?

Any suggestions would be appreciative!!!!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:39:10+00:00Added an answer on May 18, 2026 at 8:39 am

    You shouldn’t generally need to use $where …

    You should be using the “document-style query” find()

    Basically find() is MongoDB’s version of where …

    If you have a collection called mycollection and a attribute called attribute1 (this is exactly like your COLUMN1)

    So to get results like this SQL query …

    SELECT * WHERE COLOUM3 = 'KeyWord';
    

    Via the MongoDB shell, you’d use find() like so …

    > db.mycollection.find({attribute1:"KeyWord"})
    

    You really shouldn’t need to use $where for most any normal mongodb query.

    Lots more help here: http://www.mongodb.org/display/DOCS/Querying

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use huge data files, sometimes I only need to know the number of
I need to store a double as a string. I know I can use
I know that to find all the .h files I need to use: find
I need to know if there is any embedded DBMS (preferably in Java and
I know to use glGet to get various parameters. I need to know how
I need to know this differences in order to undestand how to use them
I have been browsing some php source code and need to know how the
I need to know how to use JavaScript to find out from which file
Hallo. I need know user name of user which run browser. If I use
I want to use boost::thread_specific_ptr but need to know what to add to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.