By Alvin Alexander. Last updated: June 4, 2016
Here's a quick example of how to set a default value for an HSQLDB TIMESTAMP field:
create cached table directories ( dir_id identity NOT NULL, directory varchar(255) NOT NULL, time timestamp default 'now' );
There are other ways to do this, but the important line that sets the default timestamp in the above SQL is this:
time timestamp default 'now'
This is where I'm creating a timestamp field named "time" that automatically defaults to the current date/time when a record is created.