(select count(*) num1 from student) s,
(select count(*) num2 from teacher) t
分别用两个子查询查出两个标的记录,即临时表,然后列出来就可以。有问题再留言
select a.name, max(b.log_time) from 表1 as a, 表2 as b where a.id = b.user_id group by a.name 根据您最新的需求,SQL修改如下,保证查询效率没的说: select a.id, a.name, max(b.log_time), ( select c.content from 表2 as c where c.us..欢迎分享,转载请注明来源:内存溢出
评论列表(0条)