You still have a table without a
FROM
. It's the (imaginary, dummy) table with 1 row. That's what Postgres does (and SQL Server. and MySQL). That's why 1 is returned. Nothing really spectacular here. Mind that even these 3 dbms have different rules. Some allow
SELECT .. WHERE ..
without a
FROM
. Some do not (I won't spoil the surprise, you can check ;) —
TypoCubeᵀᴹ 13 mins ago