如何从表中获取数据,而左表为空,我必须使用左联接 [英] how to fetch data from tables while left table in null and i have to use left join

查看:82
本文介绍了如何从表中获取数据,而左表为空,我必须使用左联接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我在sql查询中有一个问题,要使用多个表中的左连接来获取数据,而左连接表现在不包含初始级别的记录,现在我正在使用子查询代替,所以请告诉我正确的解决方法.

dear all,

i have a problem in sql query to fetching data using left join from multiple tables while left joining table contains no record at initial level right now i m using sub queries instead of so please tell me right solution.

推荐答案

u可以从以下示例中进行猜测

u can guess from following example

Select a.*,b.* from
a left outer join b on a.id = b.id
where b.id is null

OR

Select a.*,b.* from
a left outer join b on a.id = b.id
where b.id is not null


或提供表格的详细信息,以便为您提供所需的确切输出..

如果满意,请投票..


Or give details of your table so give u exact output what u needed..

Give votes if satisfied..


这篇关于如何从表中获取数据,而左表为空,我必须使用左联接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆