Using the distinct function in SQL

前端 未结 18 913
無奈伤痛
無奈伤痛 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:34

    You will need to say how your data is stored in-memory for us to say how you can query it.

    But you could do a separate query to just get the distinct teachers.

    select distinct teacher from class
    

提交回复
热议问题