我想要使用单个查询来自所有表的数据。我怎么可以从该表中获取数据有效如何从多个表中有效地获取数据?
下面是我的预期输出:
我已经试过这样的次给错误。
select b_id,
b_datetime,
invoice_id,
plan_id,
exp_datetime,
plan_name,
plan_amount,
months,
s_name,
s_url,
name
amount
from tblplanboughts pb,tblplans p , tblshops s , tblusers u
where pb.uid=u.uid &&
pb.plan_id=p.plan_id && u.uid=s.uid;
您现在如何创建输出?你有什么尝试?什么部分不起作用? Google sql加入。 – 2014-08-28 11:39:06
@a_horse_with_no_name,在MySQL中我们可以使用['AND'和'&&'](http://dev.mysql.com/doc/refman/5.0/en/logical-operators.html#operator_and).. :) – 2014-08-28 12:00:25
@a_horse_with_no_name,我没有深入的知识,但是我尝试了它的工作! :D – 2014-08-28 13:59:35