In SQL, how to limit the number of rows after ordering it in Oracle DB?

  • How-Tos FAQs
  • December 16, 2018
Supercharge Your Snowflake SQL
with Datameer's
Data Transformation

We can perform ‘Like’ operations in MongoDB using regular expressions. In fact, regular expressions are more powerful than the Like operator.

Let us consider the following collection:

db = {
  "fruits": [
                {"name": "apple" },
                { "name": "pineapple" },
                { "name": "orange" },
                { "name": "banana"}

For Like ‘%apple%’:

db.fruits.find({  name: {    $regex: "apple"  }})
apple, pineapple

For Like ‘a%’:

db.fruits.find({  name: {    $regex: "^a"  }})

For Like ‘%e’:

db.fruits.find({  name: {    $regex: "e$"  }})

apple, pineapple, orange

Up Next:

Read How to convert DATETIME value to VARCHAR value in SQL server?

Related Posts


How to avoid SQL injection in PHP?

  • How-Tos FAQs
  • December 15, 2018