日期:2014-05-16 浏览次数:21002 次
select a.name,b.t_num from table_A a,(select t_id,t_num from table_b where id=81) )b where a.id=b.t_id
------解决方案--------------------
select a.name ,b.t_num from table_A a ,table_b b where a.id = b.t_id and b.id=81
------解决方案--------------------
select a.name ,b.t_num
from table_A a ,table_b b
where a.id = b.t_id
and b.id=81
------解决方案--------------------
select a.name , b.t_num
from table_a a , table_b b
where a.id = b.t_id and b.id = 81
------解决方案--------------------
SELECT a.NAME,b.t_num FROM table_A AS a INNER JOIN table_b AS b ON a.ID=b.t_id WHERE b.ID=81
------解决方案--------------------
select tt.name,
ss.t_num
from
(select name from table_A t where id in (select t_id from table_b where id=81)) tt,
(select t_num from table_b s where id=81) ss
------解决方案--------------------
select A.name, B.t_num from table_A A left join table_b B on A.id = B.id where B.id=81