| Author |
prepared statements and sysdate
|
binu narayanan
Ranch Hand
Joined: Jul 24, 2009
Posts: 56
|
|
somebody help me
While using prepared statements how to insert the sysdate into a field
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Define it as a default constraint and it will be inserted whenever you create a new record.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
binu narayanan
Ranch Hand
Joined: Jul 24, 2009
Posts: 56
|
|
|
thanks i got it.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
And if that's not possible, use "new Timestamp(System.currentTimeMillis());"
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: prepared statements and sysdate
|
|
|