请问这个常见的select怎么写? select a.id,b.online,a.nane from room a,online bwhere a.id=b.idand b.online>0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select id,online,nane from room a,online bwhere a.id=b.idand b.online>0可以不?第一句一定要写成select a.id,b.online,a.nane 吗? select a.id,a.online,b.namefrom online aleft outer join room b on a.id = b.idwhere a.online>0 select room.id,online,namefrom room,onlinewhere b.online>0 and b.id in (select id from a);一楼的方法好象也是对的 select room.id,online,name from room join online on room.id=online.id where online>0 第一句一定要写成select a.id,b.online,a.nane 吗?id前面一定要有表名或表的别名,online,name前面可以不要,因为id在两个表里都有,需要确定到底用那个表的id 请教高手们:初次用mysql,建表1064错误 time列类型怎样获取当前时间 mysql 存储过程出错。 请教MySQL强制停止存储过程的方法 求一个条件查询 急求解决Myeclipse的注册码问题 ACMAIN_CHM版回来了?散分! 如何在Mysql查询将多个表记录合成一个 MYSQL的服务无法启动,是怎么回事的?? 利用PreparedStatement对sql语句的?赋值后,出现奇怪的结果。请大家帮忙解决,谢谢。 帮忙看看这个查询语句怎么写啊? 数据库读取总是停顿,怎么回事?
from room a,online b
where a.id=b.id
and b.online>0可以不?
第一句
一定要写成select a.id,b.online,a.nane 吗?
from online a
left outer join room b
on a.id = b.id
where a.online>0
from room,online
where b.online>0
and b.id in (select id from a);一楼的方法好象也是对的
第一句
一定要写成select a.id,b.online,a.nane 吗?id前面一定要有表名或表的别名,online,name前面可以不要,因为id在两个表里都有,需要确定到底用那个表的id