 
                        使用sequelize 更新字段值怎么自动+1
比如我想更新文章的浏览人数,怎么自动更新浏览人数+1,而不用先获得当前浏览人数再去+1呢?
db.nices.update({lookcount:parseInt(req.query.lookcount)+1},{where:{id:id}}).then(function (resule) {
            console.log(resule);
            if(resule>0){`请输入代码`
                res.json({
                    code:200,
                    msg:"成功",
                    object:""
                })
            }
        })Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
之前纠结过…然后直接上sequelize.literal了…