select DISTINCT column1, (select DISTINCT column2 from table1 ) from table1
I want both column1 and column2 value without duplicate
select DISTINCT column1, (select DISTINCT column2 from table1 ) from table1
I want both column1 and column2 value without duplicate
SELECT DISTINCT value
FROM Table1
CROSS APPLY
(
VALUES
('COLUMN1', Column1),
('COLUMN2', Column2)
) c(col, value)
WHERE value IS NOT NULL
select distinct column1
,column2
from table1
If you have only few duplicates, then
SELECT DISTINCT Column1, Column2 from table1
If you have many duplicates, then
SELECT Column1, Column2 from table1 GROUP BY Column1, Column2