i want to select a 1 when a special entry exists in one of my tables, otherwise a 0.
I thought of doing it like this:
SELECT 1 FROM dual .....
In PLSQL it would be like this:
SELECT CASE
WHEN EXISTS (
SELECT 1
FROM * TABLE *
WHERE * requirements *
)
THEN 1
ELSE 0
END
INTO * variable *
FROM dual;
But I have no idea how to implement something like this in normal SQL.
I just want to get a 1 if the entry exists and otherwise a 0 (null would be also okay I guess).