Archives

The List

Archive for February, 2008

« Previous Entries

MySQL Pop Quiz #9

Friday, February 29th, 2008

This poser comes from Diego Madina.
Using a fairly recent MySQL 5.0 distribution, we see that…
mysql> SELECT 1.1E0, 2.2E0, 3.3E0;
+——-+——-+——-+
| 1.1E0 | 2.2E0 | 3.3E0 |
+——-+——-+——-+
| 1.1 | 2.2 | 3.3 |
+——-+——-+——-+
1 row in set (0.00 sec)
and…
mysql> select 1.1+2.2=3.3;
+————-+
| 1.1+2.2=3.3 |
+————-+
| [...]

MySQL Pop Quiz #8

Thursday, February 28th, 2008

In Quiz #5, we looked at the following CREATE TABLE and INSERT:
CREATE TABLE test (
id varchar(1) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO test VALUES (’0′), (’1′), (’2′), (’a'), (’b');
The INSERT succeeds, and the table contains 5 rows.
The multi-row INSERT … VALUES (…), (…), … syntax is completely legal in MySQL. But…

is [...]

MySQL Pop Quiz #7

Monday, February 25th, 2008

Spanish translation by Marcos Besteiro
Today’s entry is from an anonymous contributor. Keep ‘em coming!Suppose you issue the following list of commands:
CREATE TABLE fk_relations (
key1 INT NOT NULL PRIMARY KEY,
key2 INT NOT NULL UNIQUE
);
INSERT INTO fk_relations VALUES (1,1), (2,2);
The table now contains (1,1) and (2,2). We then do
REPLACE INTO fk_relations VALUES [...]

MySQL Pop Quiz #6

Thursday, February 21st, 2008

Spanish translation by Marcos Besteiro
The following statement is completely valid and does what you expect:
SELECT DATE(creation_time) AS date,
COUNT(*) AS num_signups
FROM signups
GROUP BY date
ORDER BY date;
In MySQL, you could leave out one clause of the above SELECT statement, yet still end up with the exact same result. Which [...]

MySQL Conference ‘07 Certification Exam Pass Rates

Thursday, February 21st, 2008

Mark writes:
At the 2007 conference, they had certification tutorials for CMDBA I and II, along with MySQL Cluster . I attended the CMDBA tutorials, both tracks and it was excellent. It was also packed with attendees, and I can say what I learned there helped me greatly in passing both exams. You should know, only [...]

MySQL Pop Quiz #5

Wednesday, February 20th, 2008

Spanish translation by Marcos Besteiro
This thing is catching on … today’s question comes courtesy of Lasse Christiansen who is apparently residing in Japan (Lasse, correct me if I’m wrong).
Suppose you issue the following list of commands:
CREATE TABLE test (
id varchar(1) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO test VALUES (’0′), (’1′), [...]

More Info on MySQL Certification

Tuesday, February 19th, 2008

I suppose most readers get the contents of this blog through planetmysql — if you do, you can stop reading here.
If you do not subscribe to planetmysql, you may have missed out on Dave Stoke’s excellent writings on the subject of MySQL certification. Dave has been busy analyzing the results of previous certification exams, and [...]

MySQL Pop Quiz #4

Tuesday, February 19th, 2008

Spanish translation by Marcos Besteiro
Which data type holds the greatest range of data? MEDIUMINT or INT?
Which data type may hold the largest amount of data? MEDIUMTEXT or TEXT?

MySQL Pop Quiz #3

Monday, February 18th, 2008

Spanish translation by Marcos Besteiro
The last two Pop Quiz entries seem to have garnered some interest, so let’s do another one.
Today’s question is quite short: What is the maximum amount of data you can store in a MyISAM table?

MySQL Pop Quiz #2

Thursday, February 14th, 2008

Spanish translation by Marcos Besteiro
Yesterday’s Pop Quiz seemed quite popular, I got some personal responses and a couple of funny comments.
So here’s another one:
The table t is defined thusly on a MySQL server with no sql modes set:
CREATE TABLE t (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT
);
You [...]

« Previous Entries