Hi,
Is it possible to have a date stamp auto created in a SQL table on Insert? I have a 3rd party software that can update a 3rd party database (i.e. my sql database), but it has no option to add the current date/time when inserting a new row into the table, hence I'd like sql to automatically populate the date/time in the column when the row is created.
I've tried using GETDATE() in 'Computer Column Specification', but when the column is set to 'Is Persisted' the table can't be saved due to the error ' the column is non-deterministic' - this is apparently by design.
Is there any other options to auto generate a datetime in a column on insert of a row?
Thanks
Oli
Is it possible to have a date stamp auto created in a SQL table on Insert? I have a 3rd party software that can update a 3rd party database (i.e. my sql database), but it has no option to add the current date/time when inserting a new row into the table, hence I'd like sql to automatically populate the date/time in the column when the row is created.
I've tried using GETDATE() in 'Computer Column Specification', but when the column is set to 'Is Persisted' the table can't be saved due to the error ' the column is non-deterministic' - this is apparently by design.
Is there any other options to auto generate a datetime in a column on insert of a row?
Thanks
Oli
Comment