[英]Get all columns from other tables with a distinct
I am doing a distinct to filter by 2 columns, but I need it to bring me all the columns of the query, in this case it only brings me "idMes" and "idAnio", I need it to show me the other columns as well.我正在做一个不同的过滤2列,但我需要它来给我带来查询的所有列,在这种情况下它只给我带来“idMes”和“idAnio”,我需要它来向我展示其他列出色地。 How could I do it?
我怎么能做到?
this is my sentence:这是我的句子:
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 *
gives you all columns Select *
为您提供所有列
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.