Why COUNT(*) is equal to 1 without FROM clause?
In SQL Server a SELECT
without a FROM
clause works as though it operates against a single row table.
This is not standard SQL. Other RDBMSs provide a utility DUAL
table with a single row.
So this would be treated effectively the same as
SELECT COUNT(*) AS LargeTable
FROM DUAL
A related Connect Item discussing
SELECT 'test'
WHERE EXISTS (SELECT *)
is https://connect.microsoft.com/SQLServer/feedback/details/671475/select-test-where-exists-select