开发者

Skip Duplicate entries in row (MySQL)

I have a 开发者_如何学编程C# Windows Forms application that extracts rows from a particular column. But, many of the rows have duplicate entries (which is fine), however, I only want to display all unique row values of this one column.

Is there a MySQL query that you know about that can do this?

Thanks! :)


select distinct (`column`)...

or

select ... group by `column`


You have to use the DISTINCT keyword. It ignores duplicates.

SELECT
    DISTINCT ColumnName
FROM
    TableName
WHERE
    <condition>


select distinct(column_name) from your_table


Use the DISTINCT keyword in the SELECT statement.

SELECT DISTINCT column FROM TABLE WHERE ....
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜