CURRENT_TIMESTAMP question
John Zoetebier <[email protected]>
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Organization | Transparent Systems |
| Message-ID | <[email protected]> |
Insert query is:
insert into
"APP"."parameter" ("parameter_id","parameter_key","parameter","comment","updater_person_id","date_created","date_updated")
values (?,?,?,?,?,?,?)
Params: [4, test.test1, This is test1, This is comment, 1, CURRENT_TIMESTAMP,
null]
This query fails due to CURRENT_TIMESTAMP not being recognized as a valid
date.
It is rather inconvenient to treat CURRENT_TIMESTAMP different from other
values.
There are a few options:
1) Leave date_created out the insert
2)
Use SET syntax:
This can be handled by using "SET date_created=CURRENT_TIMESTAMP"
It is however strange that I cannot use CURRENT_TIMESTAMP in the values
clause.
Is this an SQL standard ?
--
John Zoetebier
Web site: http://www.transparent.co.nz
---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]