MySQL日期返回一些空值,但不是全部

[英]MySQL DATE returning some blank values but not all


Essentially MySQL server is returning some empty values for the data that I have inserted, anyone know why + how to fix?

MySQL服務器返回一些空值作為我插入的數據,有人知道為什么+怎么修復嗎?

Table:

表:

CREATE TABLE DRIVER (
  dr_ID INT NOT NULL,
  dr_title VARCHAR(15) NOT NULL,
  dr_fname VARCHAR(45) NOT NULL,
  dr_lname VARCHAR(45) NOT NULL,
  dr_DOB DATE NOT NULL,
  dr_licenceNo VARCHAR(45) NOT NULL,
  dr_phone VARCHAR(15) NOT NULL,
  dr_email VARCHAR(45) NOT NULL,
PRIMARY KEY (dr_ID));

Insert Data:

插入數據:

  INSERT INTO DRIVER VALUES(1, 'TITLE1', 'Jim', 'Gregory', '1982-17-02', '0123456', '02135456852', 'jimgregory@googlemail.com');
  INSERT INTO DRIVER VALUES(2, 'TITLE2', 'Jeff', 'Green', '1992-13-02', '0322351', '02431256851', 'jeffgreen@googlemail.com');
  INSERT INTO DRIVER VALUES(3, 'TITLE3', 'Jimmy', 'Bates', '1979-30-06', '0523156', '03235456852', 'jimmybates@googlemail.com');
  INSERT INTO DRIVER VALUES(4, 'TITLE4', 'James', 'Bedding', '1981-22-07', '5123452', '04355456853', 'jamesbedding@googlemail.com');
  INSERT INTO DRIVER VALUES(5, 'TITLE5', 'Jeffrey', 'Trout', '1969-11-08', '8132451', '02135476852', 'jeffreytrout@googlemail.com');
  INSERT INTO DRIVER VALUES(6, 'TITLE6', 'Jem', 'Bartler', '1991-02-01', '3423456', '04155758850', 'jembartler@googlemail.com');
  INSERT INTO DRIVER VALUES(7, 'TITLE7', 'Jeud', 'Flemming', '1988-04-03', '2123443', '02534456852', 'jeudflemming@googlemail.com');
  INSERT INTO DRIVER VALUES(8, 'TITLE8', 'Jedd', 'Dawkins', '1993-07-12', '8675643', '02112356853', 'jedddawkins@googlemail.com');
  INSERT INTO DRIVER VALUES(9, 'TITLE9', 'John', 'Silver', '1976-23-11', '0985743', '02176326854', 'johnsilver@googlemail.com');
  INSERT INTO DRIVER VALUES(10, 'TITLE10', 'Derek', 'Brown', '1985-12-05', '5123453', '02432656852', 'derekbrown@googlemail.com');

The following is the result from MySQL Server:

以下是MySQL服務器的結果:

enter image description here

For some reason some of the fields have the data and some do not. Why is this?

由於某些原因,有些字段有數據,有些則沒有。這是為什么呢?

1 个解决方案

#1


4  

The format is yyyy-mm-dd. The samples that are invalid have a month value more than 12.

yyyy-mm-dd格式。無效的示例的月值大於12。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2016/01/31/73002739506163e386a39f3f7e428ef2.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com