Jos van Oort
Jos van Oort

Reputation: 11

search and count values in column of mysql result set

I would like to search and count unique values in a column/fieldname of a MySQL Result Set.

In other words, when some lines of one table are stored in a mysql resultset I want to know which values are stored in a specific column/fieldname of all stored lines.

Upvotes: 1

Views: 582

Answers (1)

JK.
JK.

Reputation: 5136

SELECT COUNT(DISTINCT columnname) AS Total FROM yourtable

Upvotes: 2

Related Questions