I have a table application and it has 10 columns. category is one column and this column has duplicated values. To get distinct values I have a query
SELECT distinc
Try using this
SELECT DISTINCT(CATEGORY) AS CategoryName, ROW_NUMBER() OVER (ORDER BY CATEGORY) AS categoryId FROM APPLICATION WHERE applications =?