Skip to content

Instantly share code, notes, and snippets.

@dbussink
Created January 4, 2009 22:29
Show Gist options
  • Select an option

  • Save dbussink/43195 to your computer and use it in GitHub Desktop.

Select an option

Save dbussink/43195 to your computer and use it in GitHub Desktop.
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 142
Server version: 5.0.67 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SELECT COUNT(*) FROM `users` WHERE (`id` = 1);
+----------+
| COUNT(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> SET sql_auto_is_null = 0;
Query OK, 0 rows affected (0.00 sec)
mysql> SET SESSION sql_mode = 'ANSI,NO_AUTO_VALUE_ON_ZERO,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION,ONLY_FULL_GROUP_BY,TRADITIONAL';
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT COUNT(*) FROM `users` WHERE (`id` = 1);ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
mysql>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment