我有以下 MySQL 查询:
select * from u, s, c, ut, m
效果很好,显示所有表的所有列。我只想将记录计数添加到 u
表中。
我尝试过这个:
select (select count(*) as totalcount from u), * from u, s, c, ut, m
但它抛出一个错误。
最佳答案
这个查询对我有用:
select * , (select count(*) from u) as totalcount from u , s , c , ut , m ;
关于mysql - 在 'count' 子句中包含多个表的 MySQL 查询中添加 'from',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25590211/