Re: Timestamp Column.
Posted in 1998
It depends upon what Pedro realy ment when asking for a timestamp column whether this will work or not. If he want's the more common concept of a timestamp as a version stamp this (even if he used fraction(5)) wouldn't work on principle. If he wants a column to say approximately when the row was inserted or updated what is suggested here will of course be fine as long as it isn't used for say optimistic locking to check whether a column was updated by someone else in the time between last I read it and when I want to update it. Even fraction(3) or (5) will have enough accuracy to allways guarantie that. An integer that is increased by 1 for every update needs to be used instead, and that's somewhat hard to implement in Informix. Se my other posts in this thread for other solutions and further questions arround this. On 1 May 1998 17:37:42 GMT, "Arun Shastry" <accentsoft@erols.com> wrote: >Create a column of type datetime year to second and insert CURRENT into it. > >Arun > >ray_anderson@compusa.com wrote in article ><6icuv8$rmi$1@nnrp1.dejanews.com>... >> There is not a timestamp designation, but you can add a 'DATE' field >> and insert 'CURRENT YEAR TO SECOND'. >> If you require greater accuracy then you can add 'FRACTIONS (3)'. >> >> In article <6i6vdi$u7u$1@nnrp1.dejanews.com>#1/1, >> pedrocr@dicoruna.es wrote: >> > >> > Hi all. >> > >> > I want to add a column of type timestamp in a table. (Informix Online >7.1) >> > It's posible? >> > In the manual i don't find the data type timestamp. >> > Is there a type timestamp? >> > How can i do? >> > Please help. >> > Thanks. >> > >> > Pedro Castelo. >> > Diputacion Provincial de La Coru'a. >> > Spain >> > pedrocr@dicoruna.es >> > >> > -----== Posted via Deja News, The Leader in Internet Discussion ==----- >> > http://www.dejanews.com/ Now offering spam-free web-based newsreading >> > >> >> >> -----== Posted via Deja News, The Leader in Internet Discussion ==----- >> http://www.dejanews.com/ Now offering spam-free web-based newsreading >> Nils Myklebust NM Data AS Norway E-mail: Nils.Myklebust@nmdata.com FAQ at: http://www.iiug.org/techinfo/faq/faq_top.html (Now with ODBC info under "Third party products".)