Skip to content

Instantly share code, notes, and snippets.

@omarqureshi
Created July 7, 2010 11:05
Show Gist options
  • Save omarqureshi/466562 to your computer and use it in GitHub Desktop.
Save omarqureshi/466562 to your computer and use it in GitHub Desktop.
mysql> create table test(bool bit);
Query OK, 0 rows affected (0.06 sec)
mysql> insert into test values(1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into test values(0);
Query OK, 1 row affected (0.00 sec)
mysql> select count(*) from test where bool;
+----------+
| count(*) |
+----------+
| 1 |
+----------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment