I have one SQL query written below :
Select * from student where fname + ' ' + lname like '%abc mno%';
How to write the same query in MongoDB?
I have one SQL query written below :
Select * from student where fname + ' ' + lname like '%abc mno%';
How to write the same query in MongoDB?
db.collection.find({"name":/.*abc mno.*/})
OR
db.collection.find({"name":/abc mno/})
You can also use mongo regex
db.collection.find({"name":{'$regex': 'abc mno'}})