Select distinct values from 1 column

后端 未结 9 2130
忘了有多久
忘了有多久 2020-12-10 00:47

I want to select distinct values from only one column (the BoekingPlaatsId column) with this query:

SELECT MAX(BoekingPlaatsId), BewonerId, Naam, VoorNaam
F         


        
9条回答
  •  长情又很酷
    2020-12-10 01:38

    I ran into a similar problem and for me the solution was using the GROUP BY clause. So basically, I grouped all the blogs with same title as one group.

    Syntax:

    SELECT post_title, post_link
    FROM blogs
    WHERE [ conditions ]
    GROUP BY post_title
    ORDER BY post_title;
    

    Maybe you are grouping multiple columns

提交回复
热议问题