Hey @Rohit Kulkarni ,
Unfortunatley synapse doesnt allow functions as default constraints.
CREATE TABLE dbo.doc_exz (column_a INT, column_b varchar(50));
GO
INSERT INTO dbo.doc_exz (column_a) VALUES (7);
GO
ALTER TABLE dbo.doc_exz
ADD CONSTRAINT DF_Doc_Exz_Column_B
DEFAULT getdate() FOR column_b;
GO
The above code would work for Azure SQL database but not synapse.
you would get the below error:
An expression cannot be used with a default constraint. Specify only constants for a default constraint.
So ideally the best way would be to insert getdate() into rows while inserting data into synapse table