0

Since the 5.7 version, MySQL Datetime no longer accept '0000-00-00 00:00:00' as default value. Given the fact that all of my scripts rely on this default value when it comes to check datetimes, I'm a bit annoyed as I will have to reshape some parts of my code. Moreover I can't find any clear explanation and alternative regarding this matter. So I have 3 questions:

1) Why MySQL no longer accept '0000-00-00 00:00:00' as datetime default value ?

2) Should I replace it with NULL or '1000-01-01 00:00:00' ?

3) What is the best alternative ?

Thanks

Duddy67
  • 836
  • 2
  • 10
  • 26

0 Answers0