3 ms·
In my experience, MySQL lets you get into a state where questions like "hang, on - what's the difference between a DATE of '0000-00-00' and NULL?" are commonpla
by regularfry 13y ago
In my experience, MySQL lets you get into a state where questions like "hang, on - what's the difference between a DATE of '0000-00-00' and NULL?" are commonplace. This makes porting from it... not simple.
- deleted 13y ago[deleted]
- sljd 13y agoAlthough I have no experience with MySQL, this kind of problems have to be resolved by using LINQ to SQL since every db type is automatically mapped to its .NET counterpart. The DateTime .NET type then has only one representation of null.
- sljd 13y agoOr what you're saying is that if you store a date of zero VALUE to MySQL it could be magically replaced by NULL internally? That would be really crazy.
- hapless 13y agoI seem to recall it is actually the other way around, and storing a null results in a nonsense date. Added bonus: some versions will segfault if you pass an un-formattable date value.