title: SQL error: 1364 Field 'XXXX' doesn't have a default value
body: <p>So I have, table courses:</p>
  
  <pre><code>CREATE  TABLE IF NOT EXISTS `AppDziennik`.`courses` (
    `id_course` INT NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR(80) NOT NULL ,
    `teachers_id_teacher` INT NOT NULL ,
    `end_date` DATE NULL ,
    `about` VARCHAR(255) NULL ,
    `start_date` DATE NULL ,
    PRIMARY KEY (`id_course`) ,
    UNIQUE INDEX `id_course_UNIQUE` (`id_course` ASC) ,
    CONSTRAINT `fk_courses_teachers1`
      FOREIGN KEY (`teachers_id_teacher` )
      REFERENCES `AppDziennik`.`teachers` (`id_teacher` )
      ON DELETE NO ACTION
      ON UPDATE NO ACTION)
  ENGINE = InnoDB
  </code></pre>
  
  <p>and second table</p>
  
  <pre><code>CREATE  TABLE IF NOT EXISTS `AppDziennik`.`teachers` (
    `id_teacher` INT NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR(45) NOT NULL ,
    `surname` VARCHAR(45) NOT NULL ,
    `about` VARCHAR(255) NULL ,
    `id_class` INT NULL ,
    `rank` VARCHAR(45) NULL ,
    `logins_id_login` INT NOT NULL ,
    PRIMARY KEY (`id_teacher`) ,
    INDEX `fk_teachers_classes1_idx` (`id_class` ASC) ,
    INDEX `fk_teachers_logins1_idx` (`logins_id_login` ASC) ,
    CONSTRAINT `fk_teachers_classes1`
      FOREIGN KEY (`id_class` )
      REFERENCES `AppDziennik`.`classes` (`id_class` )
      ON DELETE NO ACTION
      ON UPDATE NO ACTION,
    CONSTRAINT `fk_teachers_logins1`
      FOREIGN KEY (`logins_id_login` )
      REFERENCES `AppDziennik`.`logins` (`id_login` )
      ON DELETE NO ACTION
      ON UPDATE NO ACTION)
  ENGINE = InnoDB
  </code></pre>
  
  <p>When I make that insert</p>
  
  <blockquote>
    <p>insert into appdziennik.courses
                (name, id_teacher, about, start_date, end_date) 
            values ("Math",'7',"Math",'2013-08-01','2014-06-29');</p>
  </blockquote>
  
  <p>I get that error:</p>
  
  <blockquote>
    <p>Error Code: 1364. Field 'teachers_id_teacher' doesn't have a default
    value</p>
  </blockquote>
  
  <p>Where I made mistake? How i could fix it.</p>