Using the distinct function in SQL

前端 未结 18 1157
無奈伤痛
無奈伤痛 2021-02-06 16:55

I have a SQL query I am running. What I was wanting to know is that is there a way of selecting the rows in a table where the value in on one of those columns is distinct? When

18条回答
  •  耶瑟儿~
    2021-02-06 17:33

    One option is to use a GROUP BY on Col A. Example:

    SELECT * FROM table_name GROUP BY Col A

    That should return you:

    abcd

    baac

提交回复
热议问题