select A.a1, count(*) from A,B where A.a1 = B.b2 group by A.a1
union
select A.a1, count(*) from A,C where A.a1 = C.c3 group by A.a1
union
select A.a1, count(*) from A,C where A.a1 = C.c3 group by A.a1
解决方案 »
- win7 64位操作使用default-character-set=utf8设置mysql-5.5.20-winx64的字符编码后,启动出错
- LOAD DATA INFILE 导入数据文件报错有人知道为什么吗?找了好多方法都不行
- 请教数据库导入问题
- 请高手解决:一个mysql数据库导出的问题
- MySQL有存储过程和视图吗?
- 请问在mysql作为网络数据库的情况下,如何在sql语句执行之前截获这些sql语句?
- mysql进行行级锁定
- mysql 触发器
- mysql数据库物理文件夹删除,再建立同样的数据库,显示库中的某个表已经存在而建立失败
- 求助MySQL更新
- 求教:mysql安装后问题
- 在线等:phpAds的问题:
use temp table or multiple mysql statements..
the solution without using "union" some months ago.
my model was even complicate then yours because single
temp table is not enough. therefore i have to create
a permanent "temp" table to replace the function of
union. so, i assume there are no other ways..