wieder war dies qn aus der Praxis qns in dem mysql-Zertifizierung Reiseführer ...MySQL Einfügen ungültiges Datum
FRAG
Here's the structure of a table typetest with three columns (number, string, and dates). As- sume the server is running in MySQL's “forgiving” SQL mode. mysql> DESCRIBE typetest; +--------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+---------------------+------+-----+---------+-------+ | number | tinyint(3) unsigned | YES | | NULL | | +--------+---------------------+------+-----+---------+-------+ You perform the following INSERT operation on table typetest: INSERT INTO typetest VALUES (1000,'yoodoo','999-12-31'); What data values will actually be stored in the table? Provide a short explanation.
ANTWORT
+--------+--------+------------+ | number | string | dates | +--------+--------+------------+ | 255 | yoodo | 0000-00-00 | +--------+--------+------------+ The inserted number 1000 is too big to fit in the TINYINT UNSIGNED column, so the highest pos- sible value (255) is inserted. 'yoodoo' is too long for a CHAR(5) column and is thus truncated to five characters. '999-12-31' is a date that is earlier than the earliest possible DATE value ('1000-01-01'). This is interpreted as an invalid date, so the “zero” date is stored.
wenn Ich habe versucht, '999-12-31' in ein Datum einzufügen, das ich 0999-12-31 bekomme. Ich habe gelesen, wo in der Zertifizierung Leitfaden, dass MySQL in der Lage sein kann, Daten aus dem Bereich 1000-01-01 bis 9999-12-31 einfügen. aber in der prüfung was antworte ich?