Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
31
votes
5
answers
15114
views
MySQL console: Ctrl+C driving me nuts
There is something in the MySQL console that drives me nuts. When I hit ctrl + c to cancel the current command being typed, the terminal exits. In every terminal I know (`*nix` terminals, `Python`, `PostgreSQL`), ctrl + c cancels the current command and ctrl + d exits the terminal. This issue has be...
There is something in the MySQL console that drives me nuts. When I hit ctrl+c to cancel the current command being typed, the terminal exits.
In every terminal I know (
*nix
terminals, Python
, PostgreSQL
), ctrl+c cancels the current command and ctrl+d exits the terminal.
This issue has been reported at 2003 , and bumped several times since.
Is there a way to:
* Change this behaviour, or
* Convince the MySQL dev team that this is really annoying?
Adam Matan
(12079 rep)
Jul 9, 2012, 09:28 AM
• Last activity: Jan 31, 2018, 06:27 AM
3
votes
1
answers
2546
views
Find which numbers in [1, 161] are not in the result set?
How to find which two number in `[1, 161]` is not in the result set? Can I find this two numbers using sql command? mysql> select blog_id from wp_blogs; ... | 149 | | 150 | | 151 | | 152 | | 153 | | 154 | | 155 | | 156 | | 157 | | 158 | | 159 | | 160 | | 161 | +---------+ 159 rows in set (0.25 sec)...
How to find which two number in
[1, 161]
is not in the result set?
Can I find this two numbers using sql command?
mysql> select blog_id from wp_blogs;
...
| 149 |
| 150 |
| 151 |
| 152 |
| 153 |
| 154 |
| 155 |
| 156 |
| 157 |
| 158 |
| 159 |
| 160 |
| 161 |
+---------+
159 rows in set (0.25 sec)
**The sequence is from 1 to 161, there should be 161 numbers, but only 159 numbers are in the resultset.**
mysql> select count(blog_id) from wp_blogs;
+----------------+
| count(blog_id) |
+----------------+
| 159 |
+----------------+
1 row in set (0.24 sec)
How to find the missing numbers?
hugemeow
(159 rep)
Sep 19, 2012, 07:11 PM
• Last activity: Sep 19, 2012, 11:05 PM
Showing page 1 of 2 total questions