急!!!两表联合查询 mysql数据库a 表id title content1 aa yy2 bb llb表id2 title url3 aa cc 5 bb dd我想要的结果是title content urlaa yy ccbb ll dd 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select a.title,a.content,b.url from a,b where a.title=b.title 怎么觉得你表设计的不对呢,难道外键是title而不是id?不会重名吗? SELECT * FROM yx_about,yx_two_daohang where yx_about.dh_two_name=yx_two_daohang.dh_two_name select a.title,content,url from a inner join b on a.title=b.title. 都用inner join的话一个表没有数据的时候就出不来了,用LEFT OUTER JOIN ON select c.title,c.content,d.url from 表a cleft join 表b d on c.title=d.title 接分 select a.*,b.url from a left join b where a.title=b.title 从楼主的例子看不出用inner还是outer,因为楼主没说如果一个表有,另一个表没有的时候如何显示。。 遍历文件并且匹配文件名的时候出错................ 求教在linux钟php连接sybase 在js中怎么取出php的变量值 留言板里如何添加评论功能 急!有关发送邮件的标题! 大家都来说说呀! 渐入绝境:一个form两个按钮的问题,在线等候大侠帮忙@@@@@@@@@@@@@@@@@@@@@@@@@ 求救!关于NT中实现用户认证的问题 【求问】对源代码进行流分析,使用PHP展示流图,思路。 求教一个php正则替换语句 急求,PHP后台新闻中上传图片的代码? 本人想组建一个技术团队(沈阳),有兴趣的请进!
不会重名吗?
用LEFT OUTER JOIN ON
left join 表b d on c.title=d.title 接分
select a.*,b.url from a left join b where a.title=b.title
因为楼主没说如果一个表有,另一个表没有的时候如何显示。。