May someone please show me the necessary code snippets that would allow the value of a column to take the current time ( ala now() ) by default on INSERT?
Indicative example:
CREATE TABLE foo (
a INTEGER NOT NULL DEFAULT 0,
b DATETIME NOT NULL DEFAULT now()
);
INSERT INTO foo (a) VALUES (123);
What happens here? Well, a row is inserted into table ``foo'' where ``a'' has the value 123 and b holds the date & time of when the create DDL statement was executed. I'm wondering how to get b to have the value of the time whenever any arbitrary insert statement is executed...
Ty