Skip to content

Instantly share code, notes, and snippets.

@dreams-money
dreams-money / MSSQL_add_auto_update.sql
Last active March 12, 2025 19:21
Microsoft SQL - Add an auto update clause to a column (MSSQL)
create table testing
(
id int primary key clustered,
value varchar(50) not null,
updated_at datetime2
);
insert into testing values
(1, 'foo', null),
(2, 'bar', null);
Quick one