Is the below statement valid in Java 7?
Timestamp.valueOf("0000-00-00 00:00:00.000000");
because building the above code with JDK 1.6 works just fine but while doing the same with JDK 1.7 I am getting:
Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
Well it's syntactically valid Java code, but I wouldn't expect it to work at execution time:
I'd use "0001-01-01 00:00:00.000000"
- which doesn't throw an exception. That's if you really, really need such a thing, of course - if this is a magic value to use in absence of "real" data, perhaps you need a nullable column instead?