25 January 2021
This example shows how to set the default value of a smalldatetime column to current date time.
Source code viewer
CREATE TABLE my_table ( id BIGINT NOT NULL PRIMARY KEY, modified_at smalldatetime DEFAULT GETDATE() );Programming Language: SQL