![](/img/trans.png)
[英]BQ/SQL join two tables in a way that one column fills up with all distinct values from the other table while remaining columns get a null
[英]Get all columns from other tables with a distinct
我正在做一個不同的過濾2列,但我需要它來給我帶來查詢的所有列,在這種情況下它只給我帶來“idMes”和“idAnio”,我需要它來向我展示其他列出色地。 我怎么能做到?
這是我的句子:
SELECT DISTINCT e.idMes, e.idAnio FROM expensas as e INNER JOIN anios as a on e.idAnio = a.idAnio INNER JOIN meses as m on e.idMes = m.idMes;
Select *
為您提供所有列
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.