|
|
|
|
|
by PaulHoule
1902 days ago
|
|
SQL dbs vary. You can write select a from b where 1
in MySQL and Oracle, because those db's treat true and false as 1 and 0, you can write select sum(a=1), sum(a=2) from b
others like microsoft sql and postgresql enforce a separate boolean type which means you have to put the ternary operator into the sum. |
|