hi list

in other DBs one can create time stamp column with

CREATE TABLE todo (
  id serial primary key,
  title text,
  created timestamp default now(),
  done boolean default 'f'
);

in SQLITE probably I have to add a trigger on the INSERT
event (right?) to do the same:

CREATE TABLE todo (
  id INTEGER primary key,
  title text,
  created TEXT,
  done TEXT default 'f'
);

CREATE TRIGGER add_timestamp INSERT ON todo
  BEGIN
    UPDATE todo SET created = (select datetime('now') )
WHERE ; <=#== BUT HOW TO POINT TO THE RIGHT RECORD ?
  END;

Or if there is an other way pls - tell me.

thanks in advance
-e-


-----------------------------

Спортни залагания!
bg.sportingbet.com


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to