3 ms·
Count(*) makes sense as you can count(column), count(column1, column2, ...), Count(distinct column), and count(distinct column1, column2,...) Just like in a sel
by jimktrains2 6y ago
Count(*) makes sense as you can count(column), count(column1, column2, ...), Count(distinct column), and count(distinct column1, column2,...) Just like in a select.
- ants_a 6y agoI don't know of any database that supports multi column count. But even if one did, count(*) does not have the semantics that you would expect from that. If the semantics were equivalent to expanding the column list then count(*) with a single nullable column would return the number of non-null values. But instead it is defined to return the number of rows regardless of context, being equivalent to count() or count(1).
- jimktrains2 6y agoI'm not entirely sure why I thought I've done a count with multiple columns before because it does indeed seem not to be a thing.
- deleted 6y ago[deleted]