node.js - 求一个MYSQL查询语句
迷茫
迷茫 2017-04-17 15:15:17
0
4
622

有四个表(比如是a、b、c、d),我要得到每个表中的'is_update'字段为0的id,能否用一次查询出来?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(4)
黄舟

How do you do a joint query when your four tables are not related?

-》Recently I am doing a cross-table query of database tables divided by month. gem 'active_record_union' This will be suitable for you and help you encapsulate the union

Peter_Zhu

Of course, check the union keyword in SQL

PHPzhong

The correct solution above, union merges the result set

巴扎黑

If the amount of data is not large, you can refer to the union mentioned above. If the amount of data is large, it is recommended to query in pieces and then merge them in the program...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template