Archives

The List

Pop Quiz

« Previous Entries

More MySQL quizzes

Saturday, February 6th, 2010

Not quite pop quiz format, but if you enjoyed the ones I published some time ago (almost 2 years ago now… how time flies), you’ll probably be interested to know that

MySQL Pop Quiz #29

Thursday, September 25th, 2008

Yet another quiz inspired by Freenode#mysql IRC discussions. If you haven’t been around on the channel lately, you should have a peek. Lots of interesting discussions going on!
mysql> SELECT c1, c2 FROM t WHERE c2 LIKE ‘a%’;
+——+——+
| c1   | c2   |
+——+——+
| a    | abc  |
+——+——+
Is the following construct for the LIKE clause legal?
SELECT c1, c2 [...]

MySQL Pop Quiz #28

Wednesday, September 24th, 2008

Don’t forget to send in your suggestions for new quizzes!
This quiz originated on FreeNode#mysql, where someone asked how to count the number of newline-separated “fields” in a TEXT column. For the purposes of the quiz, I’ve changed the idea slightly but you should be able to appreciate the usefulness of this method for any x-separated [...]

“My turn to play MySQL”

Thursday, August 28th, 2008

[Update: A couple of people have told me they really like "your game". I am not the creator of this game; I merely point to it. To my knowledge, I don't know any of the people involved in creating it.]
“The ATTACK query is an undocumented feature of the development branch of MySQL…”
With the popularity [...]

MySQL Pop Quiz #27

Tuesday, April 29th, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
This wonderful quiz from Vladimir Kolesnikov is one of those that should make you stop and think for a moment…
Given this table and data:
mysql> SELECT * FROM t;
+——+——+
| i1 [...]

MySQL Pop Quiz #26

Thursday, April 24th, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
Today’s quiz question, which subsequently became three, comes courtesy of Janek Bogucki.
Since questions 2 and 3 contain hints on the other questions, they are embedded within the answers to [...]

MySQL Pop Quiz #25

Wednesday, April 23rd, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
This quiz on INFORMATION_SCHEMA is stolen (with permission!), from Roland:

Specify a minimal set of columns of the information_schema.TABLE_CONSTRAINTS table that is sufficient to reliably identify a single row in [...]

MySQL Pop Quiz #24

Tuesday, April 15th, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
What happens if you try to enter the following command into MySQL?
CREATE TABLE t1 (
i INT,
INDEX i (i)
);

MySQL Pop Quiz #23

Monday, April 14th, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
Here’s something I came across several months back. Watch in wonder as we create a PRIMARY KEY which is already there, then drop it again, only and to see [...]

MySQL Pop Quizzes: Now in Spanish and Russian!

Monday, April 14th, 2008

Thanks to Marcos Besteiro and Andrew Dashin, the MySQL Pop Quizzes are now available in Spanish and Russian!
Thanks for the hard work, guys! It’s great to see that people are finding this worthwhile. I will try to get around to linking up the individual quizzes as soon as I find some time.
If you wish to [...]

« Previous Entries