I want to return 1 if some number already exists in table and 0 otherwise.
I tried something but it doesn't work:
select case when 100 in (select distinct id from test) then '1' else '0' from test
I want something similar to exists function that already exists in PostgreSQL, but instead of
false I want