0

i wanted to ask what happens when collection.deleteMany{()} is executed in java without any query or empty string. Will it fail to execute (as in nothing is deleted) or will it drop the whole database?

1 Answers1

0

in deleteMany() when you execute without query it returns error if you want to delete whole collection you could use deleteMany({})

mohammad Naimi
  • 2,259
  • 1
  • 5
  • 15