mysql数据库 有2张表,如何分别查出各自的总条数,用1条语句

studen表 teacher表 分别查出各自的总数量 并显示出来

select s.num1,t.num2 from
(select count(*) num1 from student) s,
(select count(*) num2 from teacher) t;
分别用两个子查询查出两个标的记录,即临时表,然后列出来就可以。有问题再留言
温馨提示:答案为网友推荐,仅供参考
相似回答