Re: Simple question on INSERT
Posted in 1998
Randy Galbraith wrote:
> When I INSERT a new row into an Informix database, does Informix
> maintain a 'time-stamp' for when this was done?
Simple answer: NO
That said, however,..
> And if so, can I
> select all rows that were added (INSERTed) over a given period of
> time?
There is no such feature in the informix engine at this time. However,
it is sooooo easy to do yourself, I can't picture Informix prioritizing
such a feature request:
In the table schema, include a column like:
timestamp datetime year to fraction
default current year to fraction,
and when you do an insert, explicitly specify the columns and their
values to insert but OMIT the timestamp column from the list.
Now I understand that for some tables, a 4GL programmers gets lazy and
likes to use:
INSERT INTO table VALUES rec_var.*but in most real situations, the INSERT looks more like:
INSERT INTO table (col1, col13, col33) values (val1, val2, val3)so my suggestion is unlikely to cause a hardship for your programmers.
HTH
--
-- Jake (Retrospectively realizes there is no future in hindsight)
+------------------------------------------------------------+
| The expedient performance of a task with excessive concern |
| regarding its duration-to-completion engenders a virtual |
| certainty of diminished benefit therefrom. |
| -- Benjamin Franklin (but he said it in 3 words) |
+------------------------------------------------------------+