Mysql
 sql >> Base de données >  >> RDS >> Mysql

Comment utiliser like in where condition in sequelize, node js

you can use Op operator in query
like :-

const Op = Sequelize.Op

{
  [Op.or]: [
    {
      fieldName: {
        [Op.like]: 'abc%'
      }
    },
    {
      fieldName: {
        [Op.like]: '%abc%'
      }
    }
  ]
}