I would like to do a specific query
select distinct name
from tablename
to remove duplicates. But this gives me only the names. From 'select distinct name from table' I would like all columns returned with one where condition:
select *
from tablename
where value= 1
I tried this:
select *
from tablename
where value = 1 and exists (select distinct name
from tablename)
Unfortunately it returns the same data as:
select *
from tablename
where value = 1
Which means that there is a fundamental flaw in my query.
Could someone help me with my query. Thank you in advance.