使用nodejs sequelize进行mysql的数据库查询,只会只用它查询一张表,如果想要同时查询两张表达到如下效果
MYSQLSELECT * FROM A,B WHERE A.name = B.name;
MYSQL
SELECT * FROM A,B WHERE A.name = B.name;
ringa_lee
Refer to thishttp://www.it165.net/pro/html/201508/50341.html
Define table association, see: http://docs.sequelizejs.com/en/latest/docs/associations/AssociationQuery, see: http: //docs.sequelizejs.com/en/latest/docs/querying/#relations-associations
Historical version documentationv2.0 http://docs.sequelizejs.com/en/2.0/v1.7 http://docs.sequelizejs.com/en/1.7.0/
Refer to this
http://www.it165.net/pro/html/201508/50341.html
The latest official version v3.13.0
Define table association, see: http://docs.sequelizejs.com/en/latest/docs/associations/
AssociationQuery, see: http: //docs.sequelizejs.com/en/latest/docs/querying/#relations-associations
Historical version documentation
v2.0 http://docs.sequelizejs.com/en/2.0/
v1.7 http://docs.sequelizejs.com/en/1.7.0/