Home » SQL & PL/SQL » SQL & PL/SQL » Timestamp problem
Timestamp problem [message #218644] Fri, 09 February 2007 02:27 Go to next message
Messages: 56
Registered: July 2005
Location: Indore


I am having a problem with timestamp value.
There is a table say
A having
create table A
Name varchar2(10),
tstamp timestamp(2) default systimestamp(2)

Now During Inserts

insert into A(name) values ('test');

gets the current time stamp.
But when

Update A set name='TEST' where name='test';
Here Starts the problem, i need to get the current timestamp of the update operation performed on the table.
Its same usage like MySQL
timestamp - no need to explicitly define. It executes and updates timestamp imlicitly.

NOTE - I know that it can easily implemented using trigger but requirement dont allow us to use it.
I have tried using following (applicable In MYSQL not heree - giving to make the situation more clear)
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP

Amit nanote

[Updated on: Fri, 09 February 2007 02:29]

Report message to a moderator

Re: Timestamp problem [message #218656 is a reply to message #218644] Fri, 09 February 2007 03:35 Go to previous message
Messages: 7880
Registered: March 2000
Senior Member
If you cannot use a trigger, you are out of luck. Update statements only update columns you mention (thank god!).
Previous Topic: DB refresh Steps or Documents
Next Topic: Adv of view
Goto Forum:

Current Time: Mon Oct 24 20:31:48 CDT 2016

Total time taken to generate the page: 0.27238 seconds