Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare @t table (
- descr varchar(10),
- myBit1 bit,
- myBit2 bit
- )
- insert into @t values ('test1', 0, 1)
- insert into @t values ('test2', 1, 0)
- insert into @t values ('test3', 1, 1)
- insert into @t values ('test4', 0, 0)
- select myBit1, count(myBit1) from @t group by myBit1
- select myBit2, count(myBit1) from @t group by myBit2
- myBit1
- ------ -----------
- 0 2
- 1 2
- myBit2
- ------ -----------
- 0 2
- 1 2
Add Comment
Please, Sign In to add comment