Mysql COUNT(*) on multiple tables

后端 未结 5 840
我寻月下人不归
我寻月下人不归 2020-12-23 22:55

What\'s wrong with this query:

SELECT co.*, mod.COUNT(*) as moduleCount, vid.COUNT(*) as vidCount 
 FROM courses as co, modules as mod, videos as vid 
 WHERE         


        
5条回答
  •  心在旅途
    2020-12-23 23:41

    i have better solution and easy

    SELECT COUNT(*),(SELECT COUNT(*) FROM table2) FROM table1
    

提交回复
热议问题