mysql 连接查询两表的所有字段【求教】

[复制链接]
查看11 | 回复3 | 2011-12-14 17:39:48 | 显示全部楼层 |阅读模式
select p.policy_id, p.hero_id, f.hero_id, f.hero_name, f.hero_levelfrom policy p left join friends fon p.friend_id = f.hero_id...
回复

使用道具 举报

千问 | 2011-12-14 17:39:48 | 显示全部楼层
(select policy_id,hero_id,friend_idfrom policy)union all(select hero_id,hero_name,hero_levelfrom friends);以上会将两别内的字段都查询显示出来。...
回复

使用道具 举报

千问 | 2011-12-14 17:39:48 | 显示全部楼层
select policy.*,friends.*from policy left join friendson policy.policy_id=friends.hero_id 连接查询大致是这样的。我不制定你的查询条件。玩家ID 策略ID具体的关联。还有就是分太少啊。...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行