sql >> Base de Datos >  >> RDS >> Mysql

Cómo usar la condición like in where en 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%'
      }
    }
  ]
}