The List

Archive for September, 2008

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 [...]