Q:

how to get "AND" of all the values of a boolean column in a single sql

how to get "AND" of all the values of a boolean column in a single sql query.

for above the o/p should be false, 
if all were true then o/p: true, 
if all/atlease one value false , then o/p: false.

A:

Try this
IF EXISTS (SELECT ActiveStatus From TableName where ActiveStatus = 0)
  SELECT 'False'
ELSE
  SELECT 'True'
AS OutputColumn

