companyname A B C A D B
select count(companyname), companyname from tablename group by companyname
SELECT DISTINCT companyname from TABLE
SELECT COUNT(DISTINCT companyname) from TABLE
select distinct companyname from tablename
Dim distinctTable As DataTable = table11.DefaultView.ToTable("DistinctTable", True, "Name")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)